Error nginx "conflicting server name" is ignored

server { #listen 80; ## listen for ipv4; this line is default and implied #listen [::]:80 default ipv6only=on; ## listen for ipv6 #root /usr/share/nginx/www; root /home/ubuntu/node-login; # Make site accessible from server_name ec2-xx-xx-xxx-xxx.us-west-1.compute.amazonaws.com; location /{ proxy_pass http://127.0.0.1:8000/; proxy_redirect off; } 

}

this leads to a nignx error [warns] about a conflicting server name "ec2 ..." at 0.0.0.0:80 is ignored I don’t understand, any explanation is appreciated. Thank.

+61
nginx
Jul 11 '12 at 5:28
source share
3 answers

I assume that you are using Linux and you are using gEdit to edit your files. In /etc/nginx/sites-enabled it can leave a temporary file, for example. default~ (see ~ ).

Depending on your editor, the file may be named .save or something like this. Just run $ ls -lah to see which files are inadvertently there and delete them (thanks @Tisch for this).

Delete this file and it will solve your problem.

+109
Dec 23 '12 at 13:45
source share

You still have server_name ec2-xx-xx-xxx-xxx.us-west-1.compute.amazonaws.com somewhere in the config.

+17
Jul 11 2018-12-12T00:
source share

Only one local host should be installed, check sites with support or nginx.conf.

+8
Mar 06 '13 at 1:32
source share



All Articles