Right, sorry for the previous, recent questions I've asked about nginx, this is just doing my head in.
I've enabled PHP using fastcgi_php and it works just fine, however, when I access to a PHP file, e.g.
(which applies to var/www/domain.com/www/info.php)
Which includes the phpinfo() and nginx throws an 404 error... if I access to a normal file, e.g.
It seems fine... how come nginx won't process with the PHP files?
This is the etc/nginx/sites-enabled/domain.com.
server { listen 80; server_name domain.com *.domain.com; access_log /var/www/domain.com/logs/nginx_access.log; error_log /var/www/domain.com/logs/nginx_error.log; root /var/www/domain.com/www/; location / { index index.html index.htm index.php; } error_page 500 502 503 504 /50x.html; location = /50x.html { root /var/www/nginx-default; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # location ~ /\.ht { deny all; } # Enable PHP include /etc/nginx/fastcgi_php; } I have no clue what to do further...
EDIT:
My /etc/nginx/fastcgi_php
location ~ \.php$ { fastcgi_pass unix:/var/run/php-fastcgi/php.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include /etc/nginx/fastcgi_params; }