Hello,
I have a web server that has one main page and a bunch of subdomains created with location blocks as so:
my.domain.com points to /usr/share/nginx/www/joomla, inside this directory is index.php which works fine.
my.domain.com/dynmap points to /usr/share/nginx/www/dynmap, inside this directory is index.html which works fine.
my.domain.com/mumble points to /usr/share/nginx/www/mumble, inside this directory is index.php, when I try to go to it in Chrome it downloads the php file instead of displaying the page, if I go to it in IE I get a 404 error page generated by the site running in the joomla directory.
Here is my sites-available code:
server {
server_name my.domain.com _;
server_name_in_redirect off;
listen 80;
root /usr/share/nginx/www/joomla;
index index.php index.html index.htm default.html default.htm;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
location /dynmap {
root /usr/share/nginx/www;
}
location /mumble {
root /usr/share/nginx/www;
}
location ~* \.php$ {
try_files $uri /index.php;
fastcgi_pass unix:/tmp/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_nam$
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
location ~ /\. {
access_log off;
log_not_found off;
deny all;
}
}
I'm not sure what I need to do, or what I am doing wrong but it's been driving me crazy for the last couple days.