Hello, I have been trying to get help with my nginx config here: http://serverfault.com/questions/612871/nginx-config-not-displaying-right-site-for-subdomain
Nginx happily serves up the wrong site and doesn't complain about it in the log no matter what the log level is set to. I have been trying to set up a subdomain for 3 days. Lets just say I am not the biggest nginx advocate at the moment.
Here is the original post to save you going to server fault. Any help would be great!
----
My config below is not working for some reason, I have checked the following:
file ownership
file permission
nginx debug
the configs in sites-enabled and sites-available are symlinked
I assume the configs are readable or something would come up in the logs?
For some reason it is serving up the wrong page when I go to http(s)://vma.ottawakaraoke.com
I noticed that the error and access logs (as defined in config below) are empty. So obviously its not getting hits.
The host paramater in the request header is vma.ottawakaraoke.com - so I can confirm nginx should be picking up on the subdomain.
Also I have tried with and without the listen 80 part of the code.
I have been tailing nginx logs trying to find a fault but its just happily serving up the wrong site. Nginx so far is proving much more trouble than its worth. If anyone could help that would be great. Thanks.
server {
listen 80;
server_name vma.ottawakaraoke.com;
access_log /var/www/vma.ottawakaraoke.com/logs/access.log;
error_log /var/www/vma.ottawakaraoke.com/logs/error.log;
root /var/www/vma.ottawakaraoke.com/public_html/;
location / {
index index.html index.htm index.php;
}
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
}
Nginx happily serves up the wrong site and doesn't complain about it in the log no matter what the log level is set to. I have been trying to set up a subdomain for 3 days. Lets just say I am not the biggest nginx advocate at the moment.
Here is the original post to save you going to server fault. Any help would be great!
----
My config below is not working for some reason, I have checked the following:
file ownership
file permission
nginx debug
the configs in sites-enabled and sites-available are symlinked
I assume the configs are readable or something would come up in the logs?
For some reason it is serving up the wrong page when I go to http(s)://vma.ottawakaraoke.com
I noticed that the error and access logs (as defined in config below) are empty. So obviously its not getting hits.
The host paramater in the request header is vma.ottawakaraoke.com - so I can confirm nginx should be picking up on the subdomain.
Also I have tried with and without the listen 80 part of the code.
I have been tailing nginx logs trying to find a fault but its just happily serving up the wrong site. Nginx so far is proving much more trouble than its worth. If anyone could help that would be great. Thanks.
server {
listen 80;
server_name vma.ottawakaraoke.com;
access_log /var/www/vma.ottawakaraoke.com/logs/access.log;
error_log /var/www/vma.ottawakaraoke.com/logs/error.log;
root /var/www/vma.ottawakaraoke.com/public_html/;
location / {
index index.html index.htm index.php;
}
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
}