I have a simple nginx setup and things work fine.
I have set the index as follows:
index index.html index.php
The server_name is set to local.nginx. If i request http://local.nginx it works fine, but if i request http://local.nginx/index.php - the raw file is sent to the browser.
What is wrong?
Please see my config below:
server {
listen 80;
server_name local.nginx;
root /var/www/local.nginx/;
index index.html index.php;
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
EDIT
I discovered this was only happening in chrome. After clearing the browser cache the problem disappeared. Can anyone explain what happened here ?