Want more timely Centmin Mod News Updates?
Become a Member

Nginx Nginx warn log: [warn] : conflicting server name "domain.tools" on 0.0.0.0:80, ignored

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by pamamolf, Feb 27, 2015.

Tags:
  1. pamamolf

    pamamolf Premium Member Premium Member

    4,068
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    5:39 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    Hi

    I just found on nginx error log file this:

    Code:
    [warn] : conflicting server name "domain.tools" on 0.0.0.0:80, ignored
    Centos 7 with latest beta 08 centminmod.


    Any ideas?
     
  2. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    12:39 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    You have that domain domain.tools referenced in more than one Nginx vhost so find out which file

    Code:
    grep -Ro domain.tools /usr/local/nginx/conf | uniq
     
  3. pamamolf

    pamamolf Premium Member Premium Member

    4,068
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    5:39 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    Code:
    /usr/local/nginx/conf/conf.d/phpmyadmin_ssl.conf:domain.tools
    /usr/local/nginx/conf/conf.d/phpmyadmin_ssl.conf:domain.tools
    /usr/local/nginx/conf/conf.d/phpmyadmin_ssl.conf:domain.tools
    /usr/local/nginx/conf/conf.d/domain.tools.conf:domain.tools
    /usr/local/nginx/conf/conf.d/domain.tools.conf:domain.tools
    /usr/local/nginx/conf/conf.d/domain.tools.conf:domain.tools
    /usr/local/nginx/conf/conf.d/domain.tools.conf:domain.tools
    /usr/local/nginx/conf/conf.d/domain.tools.conf:domain.tools
    /usr/local/nginx/conf/conf.d/domain.tools.conf:domain.tools
    /usr/local/nginx/conf/conf.d/virtual.conf:domain.tools
    /usr/local/nginx/conf/phpmyadmin.conf:domain.tools

    I think the problem is here:

    Code:
    # redirect from non-www to www
    # uncomment, save file and restart Nginx to enable
    # if unsure use return 302 before using return 301
    server {
      listen  80;
      server_name www.domain.tools;
      return 301 $scheme://domain.tools$request_uri;
      }
    server {
      server_name domain.tools;
    But is it ok to comment the last two lines and all to work ok as i want also to rewrite www to none?

    Code:
    #server {
    #server_name domain.tools;
     
    Last edited: Feb 28, 2015
  4. eva2000

    eva2000 Administrator Staff Member

    53,461
    12,128
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,668
    Local Time:
    12:39 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    no no you should only be concerned with duplicates where server context container is related to listen port 80 and not server contexts which contain port 443
     
  5. pamamolf

    pamamolf Premium Member Premium Member

    4,068
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    5:39 AM
    Nginx-1.25.x
    MariaDB 10.3.x
    Can't find it then :(
     
  6. Steve Tozer

    Steve Tozer Member

    70
    42
    18
    Jul 28, 2014
    South Wales, UK
    Ratings:
    +49
    Local Time:
    3:39 AM
    1.91
    10.0.19
    By any chance is the server hostname the same as the domain that its saying is conflicting?