Reputation: 2692
How does nginx figure I have a conflicting server name?
[warn] conflicting server name "" on 0.0.0.0:80, ignored nginx.
I wouldn't care, except it only seems to be serving files from project.ca and completely ignores 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
}
}
Upvotes: 0
Views: 166
Reputation: 2692
The answer is:
There is a missing semi colon after index index.html
And for those interested, you can set server_name to .project.ca
instead of project.ca *.project.ca
as they are both the same.
Upvotes: 1