create a virtual-host (server block)

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


hello

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.

*/vhosts-anable/test.conf*
*server {
        listen          80;
        server_name  sd-32587.dedibox.fr;# localhost;

       # == Document ROOT
       root /home/sites_web/www.test.com/public;

       rails_env development;
       passenger_enabled on;

} *

And this is my conf for the virtual-host.
*/vhosts-anable/pipou.conf*
*server {

            listen 80 ;
            server_name websvn.sd-32587.dedibox.fr; #websvn.localhost
*.localhost;
#            rewrite ^/(.*) http://localhost/$1 permanent;
#            server_name_in_redirect off;
#            rewrite ^ http://websvn.sd-32587.dedibox.fr$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 *websvn.sd-32587.dedibox.fr* i have an error .
Could you help me please
thk a lot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20121109/cda8c309/attachment.html>


More information about the nginx mailing list