nginx/146 configured Virtual host access prompt "File not found" C9 Continental not found File 404 Not found 404 Not found repair

Source: Internet
Author: User
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;
# 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.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.