The domain shows error: "No input file specified"

Created:

2016-11-16 13:00:01 UTC

Modified:

2017-06-15 12:22:46 UTC

0

Was this article helpful?


Have more questions?

Submit a request

The domain shows error: "No input file specified"

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 10.4 for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux

Symptoms

Domain uses .htaccess and PHP in FastCGI mode. When I try to browse PHP page, I page is giving an error: "No input file specified" error"

Cause

  1. Incorrect rules in .htaccess file.
  2. Wrong permissions for file in domain.tld/htpdocs folder or for folder /var/www/vhosts/domain.tld/httpdocs/ itself.

Resolution

  1. If you use .htaccess, make sure that is correct. Here is small script that redirect all links to index.php:

    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_URI} !(.*)/$
    RewriteRule ^(.*)$ http://domain.tld/$1/ [R=301,L]

    RewriteCond $1 !^(css|images|js|system|themes|favicon\\.ico|robots\\.txt|index\\.php|audio|files) [NC]
    RewriteRule ^(.*)$ /index.php?/$1 [L]
  2. Check permissions for folder /var/www/vhosts/domain.tld/httpdocs/ and content. It should looks like below:

    # ls -la /var/www/vhosts/domain.tld/httpdocs/
    total 40
    drwxr-x--- 6 ftpuser psaserv 4096 Dec 5 14:12 .
    drwx--x--- 5 ftpuser psaserv 4096 Dec 5 14:12 ..
    drwxr-x--- 3 ftpuser psaserv 4096 Dec 5 14:12 cgi-bin
    drwxr-xr-x 2 ftpuser psacln 4096 Dec 5 14:12 css
    -rw-r--r-- 1 ftpuser psacln 1150 Dec 5 14:12 favicon.ico
    drwxr-xr-x 4 ftpuser psacln 4096 Dec 5 14:12 img
    -rw-r--r-- 1 ftpuser psacln 11390 Dec 5 14:12 index.html
    drwxr-xr-x 11 ftpuser psacln 4096 Dec 5 14:12 test

where ftpuser is main FTP user of subscription.

Have more questions? Submit a request
Please sign in to leave a comment.