Home  >  Article  >  Backend Development  >  nginx/146 configured virtual host access prompt "File not found" c9 mainland not found file 404 not found 404 not found repair

nginx/146 configured virtual host access prompt "File not found" c9 mainland not found file 404 not found 404 not found repair

WBOY
WBOYOriginal
2016-07-29 08:54:271677browse

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,

Can anyone explain why this is?

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.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn