Nginx错误冲突的服务器名称“averydemo.teconicasolutions.tk”

时间:2018-05-28 06:20:59

标签: nginx nginx-location

所以我有以下配置

server:{
  server_name teconicasolutions.tk www.teconicasolutions.tk;
   root /var/www/main-site/frontend;
   index index.html index.php index.htm;

    location / {
         try_files $uri $uri $uri/ /200.html;
    }
  }

我也有子域名

server {
    listen 80;
    listen [::]:80;


   server_name averydemo.teconicasolutions.tk;

   root /var/www/demo/avery/frontend;
   index index.html index.php index.htm;

   location / {
      try_files $uri $uri $uri/ /index.html;
   }

  # deny access to .htaccess files, if Apache's document root
    # concurs with nginx's one
    #
    location ~ /\.ht {
            deny all;
    }

}

但现在出现

的错误
 conflicting server name "averydemo.teconicasolutions.tk" on 0.0.0.0:80, ignored

我可能会出错,因为一个是主域名,下一个是主域名的子域名

这在哪里错了?

0 个答案:

没有答案