Home >Backend Development >PHP Tutorial >nginx/146 configured virtual host access prompt 'File not found' c9 mainland not found file 404 not found 404 not found repair
Check the log tail /var/log/nginx/error.log, it prompts "primary script unknown while reading response header from upstream"
View the configuration file part of the virtual host as follows:
location ~ .php {
#fastcgi_pass remote_php_ip:9000;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
set $real_script_name $fastcgi_script_name;
if ($fastcgi_script_name ~ "^ (.+?.php)(/.+)$") {
set $real_script_name $1; real_script_name;
fastcgi_param PATH_INFO $path_info; }
There is a default configuration file default part in the default file after copying nginx. .+) $; # # #Note: You should have "cgi.fix_pathinfo = 0; H php5 -fpm: fastcgi_pass unix:/var/run/php5-fpm.sock; }
Reload nginx servcie nginx reload the problem is solved,
The above introduces the virtual host access prompt "File not found" configured by nginx/146, including the content of file not found. I hope it will be helpful to friends who are interested in PHP tutorials.