create a virtual-host (server block)

Olivier Morel oliviermo75 at
Thu Nov 8 23:19:09 UTC 2012


I try to put a virtual host (server block) on my website, i have some issue.

I have read the nginx tutorial for creat server block but after a lot of
time i can't get my server block and i dont understand why.
Do you have something to configure on /etc/hosts or resolv.conf ?

this is my server block for my website.

*server {
        listen          80;
        server_name;# localhost;

       # == Document ROOT
       root /home/sites_web/;

       rails_env development;
       passenger_enabled on;

} *

And this is my conf for the virtual-host.
*server {

            listen 80 ;
            server_name; #websvn.localhost
#            rewrite ^/(.*) http://localhost/$1 permanent;
#            server_name_in_redirect off;
#            rewrite ^$1 permanent;
            root /home/sites_web/websvn;
            index index.html;
            error_log  /home/logs/websvn/error.log;
            access_log /home/logs/websvn/access.log;

when i m going to ** i have an error .
Could you help me please
thk a lot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list