Here's part of config in the server block:
I was unable to execute any php script , I placed a file named test.php
under /var/html , but when I point to http://localhost/test.php
, I got a result:
File not found.
,
That's not generated by nginx , since it's different from the 404 page of nginx.
location / {
root /var/html;
index index.html index.htm;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_intercept_errors on;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi.conf;
}
Did I miss anything ?