Welcome! Log In Create A New Profile

Advanced

Nginx server_name command being ignored

December 14, 2012 08:01AM
Hi, I'm running ubuntu server 12.04 and the latest version of nginx. The problem I am having is that nginx seems to be ignoring the server_name command, I am able to access the server by going to the IP address of the server or by going to the server's name (http://ubuntuserver/) but http://test/ will give me nothing, no connection, not even an error page. I have checked that the website file (in enabled-sites) is included in the nginx.conf file and I have correctly restarted nginx having changed settings. I have tried with the whole server block stripped down to just the server_name designation and still I can't get anything at http://test/ and in this case I get an expected error page on http://ubuntuserver/

I can only deduce that for some reason the "server_name" command is being ignored!

If anyone could give me any advice with regards to this then it would be much appreciated.

Code from file "www" in "enabled-sites":

server {
add_header Cache-Control public;
access_log /var/log/nginx/access.log main buffer=32k;
error_log /var/log/nginx/error.log error;
expires max;
limit_req zone=gulag burst=200 nodelay;
listen 127.0.0.1:80 sndbuf=128k;
root /usr/share/nginx/html;
server_name test;
}
SubjectAuthorPosted

Nginx server_name command being ignored

constable1December 14, 2012 08:01AM

Re: Nginx server_name command being ignored

Antonio P.P. AlmeidaDecember 14, 2012 08:10AM

Re: Nginx server_name command being ignored

Jonathan MatthewsDecember 14, 2012 08:10AM

Re: Nginx server_name command being ignored

constable1December 14, 2012 08:12AM

Re: Nginx server_name command being ignored

Jonathan MatthewsDecember 14, 2012 08:20AM

Re: Nginx server_name command being ignored

constable1December 14, 2012 06:54PM

Re: Nginx server_name command being ignored

Jonathan MatthewsDecember 14, 2012 07:24PM

Re: Nginx server_name command being ignored

constable1December 14, 2012 08:20PM

Re: Nginx server_name command being ignored

Francis DalyDecember 15, 2012 06:08AM

Re: Nginx server_name command being ignored

constable1December 15, 2012 06:32AM

Re: Nginx server_name command being ignored

Francis DalyDecember 15, 2012 06:48AM

Re: Nginx server_name command being ignored

constable1December 15, 2012 07:01AM

Re: Nginx server_name command being ignored

Francis DalyDecember 15, 2012 09:12AM

Re: Nginx server_name command being ignored

Francis DalyDecember 14, 2012 08:14AM

Re: Nginx server_name command being ignored

Francis DalyDecember 14, 2012 08:34AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 93
Record Number of Users: 2 on November 23, 2014
Record Number of Guests: 377 on November 23, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready