2014-11-12 3 views
0

Как выглядит nginx У меня есть конфликтное имя сервера?Файл конфигурации Nginx

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

Я бы не все равно, за исключением только кажется, будет служить файлы из project.ca и полностью игнорирует projectfinancial.com ...

server { 
     root /var/www/project/infrastructure/project/static-sites/projectlabswebsite; 
     index index.html 
     server_name projectfinancial.com *.projectfinancial.com; 
     location/{ 
       # First attempt to serve request as file, then 
       # as directory, then fall back to index.html 
       try_files $uri $uri/ /index.html; 
       # Uncomment to enable naxsi on this location 
       # include /etc/nginx/naxsi.rules 
     } 
} 

server { 
     root /var/www/project/infrastructure/project/static-sites/project-website; 
     index index.html 
     server_name project.ca *.project.ca; 
     location/{ 
       # First attempt to serve request as file, then 
       # as directory, then fall back to index.html 
       try_files $uri $uri/ /index.html; 
       # Uncomment to enable naxsi on this location 
       # include /etc/nginx/naxsi.rules 
     } 
} 

ответ

1

Ответ:

Отсутствует полуторный двоеточие после индекса index.html

И для тех, кого это интересует, вы можете установить имя_сервера на .project.ca вместо project.ca *.project.ca, поскольку они оба одинаковы.

Смежные вопросы