Nginx hint no input file specified what to do

Source: Internet
Author: User
Tags ini file permissions

1, PHP.ini (/usr/local/php/etc/php.ini) in the configuration found in

Cgi.fix_pathinfo=0

Change it to

Cgi.fix_pathinfo=1

2, nginx configuration file/etc/nginx/conf/nginx.conf Note the following sections

The code is as follows
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 part path needs to be filled out according to the actual situation of your host directory

After configuring the above section, restart the Nginx and PHP-FPM, the problem is successful

In addition, it may be related to the path or permissions, or the Script_filename variable is not set correctly (this is the most common reason for nginx)

1 if there are 404 errors in HTML, then there is a problem with the document root setting

2 Check script file permissions, maybe php or Web server can not read it

3) Script_filename Set error

Workaround:

Script_filename settings are excluded, the problem appears on the Directory folder and file permission access. The permissions of the file WWW user group have been reset, and the background can be accessed immediately. Here again special thanks for long cool child shoes.

The SSH command to set permissions is

The code is as follows

CHOWN-VR Www:www/folder

Add: My Script_filename set the parameters

Vim fcgi.conf (Script_filename directory)

The code is as follows

Fastcgi_param script_filename $document _root$fastcgi_script_name;
Fastcgi_param script_name $fastcgi _script_name;
Fastcgi_param Request_uri $request _uri;
Fastcgi_param Document_uri $document _uri;
Fastcgi_param document_root $document _root;
Fastcgi_param server_protocol $server _protocol;

The permissions corresponding to the Document_root must be the same as the nginx.conf and fcgi.conf users

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.