All Products
Search
Document Center

:The system prompts "No input file permission" when accessing the website of the ECS server

Last Updated:May 07, 2022

Disclaimer: This article may contain information about third-party products. Such information is for reference only. Alibaba Cloud does not make any guarantee, express or implied, with respect to the performance and reliability of third-party products, as well as potential impacts of operations on the products.

Problem description

The following message is displayed when you access the website of the ECS server.

 No input file already exists 

Solution

Select the following steps based on the actual on-site environment.

IIS configuration

Method 1

Modify the php. Ini file, find the row where doc_root is located, comment out the row, and restart IIS.

Method 2

Modify the php. Ini file and find the following content.

;cgi.force_redirect = 1

Delete the semicolon and change "1" to "0".

cgi.force_redirect = 0

Apache Configuration

Open the. htaccess file, find the row where RewriteRule is located, and add a question mark after index. php, as shown below.

.htaccess
RewriteEngine on
RewriteCond $1 ! ^(index.php|images|robots.txt)  
RewriteRule ^(.*)$ /index.php? /$1 [L]

For more information about how to use Apache to parse files into php files, see.

  1. Apache can parse files with any suffix into php format. Run the following command and separate them with spaces. In this example, add. phtml.
    AddType application/x-httpd-php .php .phtml
  2. Run the following command to modify. phps to the PHP source file.
    AddType application/x-httpd-php-source .phps
  3. Stop Apache and restart Apache, instead of using HUP or USR1 to reload Apache.

Nginx configuration

  1. Edit /Etc/php5/cgi/php. ini file, add the following content.
    cgi.fix_pathinfo=1
    doc_root=
  2. Edit Etc/nginx/sites-available/default file.
    location ~ \.php$ {
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
         fastcgi_param  SCRIPT_FILENAME  /var/www/nginx-default$fastcgi_script_name;
                   include              fastcgi_params;
           }
  3. Run the following command to restart NTP:
    service nginx restart

Application scope

  • ECS