If you find any warning message whenever you restart nginx server process as follows:
Restarting nginx daemon: nginxRemaining processes: 16546
nginx: [warn] conflicting server name "198.74.122.96" on 198.74.122.96:80, ignored
nginx: [warn] conflicting server name "198.74.122.96" on 198.74.122.96:80, ignored
nginx: [warn] conflicting server name "198.74.122.96" on 198.74.122.96:80, ignored
nginx: [warn] conflicting server name "198.74.122.96" on 198.74.122.96:80, ignored
nginx: [warn] conflicting server name "198.74.122.96" on 198.74.122.96:80, ignored
nginx: [warn] conflicting server name "198.74.122.112" on 198.74.122.112:80, ignored
Then follow the steps to instantly fix such issue:
- cd /etc/nginx/vhosts
- perl -pi -w -e 's/server_name(.*) Replace_With_IP_Address_Here/server_name$1/g;' *
- /etc/init.d/httpd restart