92bondstreet/nodeginx

Default setting gives nginx errors

peny opened this issue · 2 comments

peny commented

When I ran the command:

nodeginx -o /etc/nginx/sites-available/dev -p 80 -r /home/www/dev/ -u 8010 -s dev.website.com
service nginx restart

I got the following error messages:

nginx: [warn] server name "http://www.dev.website.com" has suspicious symbols in /etc/nginx/sites-enabled/dev:13

nginx: [emerg] invalid URL prefix in /etc/nginx/sites-enabled/dev:38

Line 13 is:

server_name http://www.dev.website.com dev.website.com;

Line 38 is:

proxy_pass         8010;

In my case removing the http:// from line 13 and changing line 38 to:

proxy_pass         http://localhost:8010;

did the trick.

Is there any reason for the original settings or should I submit a pull request?

peny commented

Oh, same error on nginx 1.4.6 and 1.6

server_name http://www.dev.website.com dev.website.com; instead of this could u pls use this below
server_name www.dev.website.com dev.website.com
server_name is wrong. It should be plain domain name