Nginx hint no input file specified.

Source: Internet
Author: User
Because the disk location is not enough to do the migration, the Vhost configuration file

 server {Listen 80; server_name ***.****.com; Index index.php index.html index.htm; Root/home/wwwroot/default; Error_page 404/404.html; Error_page 502 504/502.html; Include enable-php.conf; Location/{index index.php index.html; } location/nginx_status {stub_status on; Access_log off; } location/status {stub_status on; Access_log off; } location ~. *\. (gif|jpg|jpeg|png|bmp|swf) $ {# expires 30d; } location ~. *\. (JS|CSS)? $ {# expires 12h; } location ~ \.php$ {#root html; Fastcgi_pass 127.0.0.1:9000; Fastcgi_index index.php; Fastcgi_param script_filename $document _root$fastcgi_script_name; #fastcgi_param Script_filename/mnt/wwwroot/default$fastcgi_script_name; Include Fastcgi_params; } Access_log/home/wwwlogs/access.log access;} 

root /home/wwwroot/default;change it into a root /mnt/wwwroot/default; hint no input file specified .

/mnt/wwwroot/defaultThis directory is definitely present because other configuration servers are accessible

The strange thing is that the setting is set /home/wwwroot/default to root /mnt/wwwroot/default; error,
The contents of the two folders are exactly the same.
Solving.

Reason

Find the cause of the problem, the directory has a .user.ini file, Nginx cross-directory used, direct CP come over, this file did not change the content oropen_basedir=/home/wwwroot/default:/tmp/:/proc/
Change open_basedir=/mnt/wwwroot/default:/tmp/:/proc/ it.

Reply content:

Because the disk location is not enough to do the migration, the Vhost configuration file

 server {Listen 80; server_name ***.****.com; Index index.php index.html index.htm; Root/home/wwwroot/default; Error_page 404/404.html; Error_page 502 504/502.html; Include enable-php.conf; Location/{index index.php index.html; } location/nginx_status {stub_status on; Access_log off; } location/status {stub_status on; Access_log off; } location ~. *\. (gif|jpg|jpeg|png|bmp|swf) $ {# expires 30d; } location ~. *\. (JS|CSS)? $ {# expires 12h; } location ~ \.php$ {#root html; Fastcgi_pass 127.0.0.1:9000; Fastcgi_index index.php; Fastcgi_param script_filename $document _root$fastcgi_script_name; #fastcgi_param Script_filename/mnt/wwwroot/default$fastcgi_script_name; Include Fastcgi_params; } Access_log/home/wwwlogs/access.log access;} 

root /home/wwwroot/default;change it into a root /mnt/wwwroot/default; hint no input file specified .

/mnt/wwwroot/defaultThis directory is definitely present because other configuration servers are accessible

The strange thing is that the setting is set /home/wwwroot/default to root /mnt/wwwroot/default; error,
The contents of the two folders are exactly the same.
Solving.

Reason

Find the cause of the problem, the directory has a .user.ini file, Nginx cross-directory used, direct CP come over, this file did not change the content oropen_basedir=/home/wwwroot/default:/tmp/:/proc/
Change open_basedir=/mnt/wwwroot/default:/tmp/:/proc/ it.

Set $phproot/mnt/wwwroot/default;
Fastcgi_param script_filename $phproot/$fastcgi _script_name;

  • 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.