View Log tail/var/log/nginx/error.log, prompting "primary script unknown while reading response headers from upstream"
View the configuration Files section of this 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 $;
Set $path _info;
}
Fastcgi_param script_filename $document _root$real_script_name;
Fastcgi_param script_name $real _script_name;
Fastcgi_param path_info $path _info;
}
Helpless copy installation Nginx has a default configuration file in the Location section of default, as follows:
Location ~ \.php$ {
Fastcgi_split_path_info ^ (. +\.php) (/.+) $;
# # Note:you should has "cgi.fix_pathinfo = 0;" In php.ini
#
# # with php5-cgi alone:
# Fastcgi_pass 127.0.0.1:9000;
# with PHP5-FPM:
Fastcgi_pass Unix:/var/run/php5-fpm.sock;
Fastcgi_index index.php;
Include Fastcgi_params;
}
Heavy-duty Nginx Servcie Nginx Reload after the problem solved,
Who can explain why this is?
The above describes the nginx/146 configuration of the virtual host access prompt "File not found", including the file not found aspects of the content, I hope to be interested in PHP tutorial friends helpful.