Solve the Noinputfilespecified problem in nginx

Source: Internet
Author: User
The virtual machine has encountered Noinputfilespecified in testing nginx, and multiple parties have finally found a solution. 1. php. ini (/usr/

No input file specified was encountered in testing nginx on the virtual machine, and a solution was finally found for multiple parties.
 
1. in the configuration of php. ini (/usr/local/php/etc/php. ini), find
Cgi. fix_pathinfo = 0
Change it
Cgi. fix_pathinfo = 1
 
2. Note the following in the nginx configuration file/etc/nginx/conf/nginx. conf:

Location ~ . Php $ {
Fastcgi_pass 127.0.0.1: 9000;
Fastcgi_index index. php;
Fastcgi_param SCRIPT_FILENAME/home/www/blog $ fastcgi_script_name;
Include fastcgi_params;
}
 
The red path must be set based on your host's main directory.
After configuring the preceding sections, restart nginx and php-fpm. The problem is successful.
 

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: info-contact@alibabacloud.com 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.