Welcome! Log In Create A New Profile

Advanced

Invalid Config

Posted by faddishworm 
Invalid Config
July 16, 2014 01:56AM
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;
}
}
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 147
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready