nginx: [warn] conflicting server name "XXX.XXX.XXX.XXX" on XXX.XXX.XXX.XXX:80, ignored Print

  • 13

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:


  1. cd /etc/nginx/vhosts
  2. perl -pi -w -e 's/server_name(.*) Replace_With_IP_Address_Here/server_name$1/g;' *
  3. /etc/init.d/httpd restart

Was this answer helpful?

« Back