Answers.Body: <p>It turned out that the problem was from customizing the domain's document root in the userdata files and then the PHP-FPM configuration had not been rebuilt and the service not restarted.  The following resolved the issue:</p>
  
  <pre><code>/scripts/php_fpm_config --rebuild
  /scripts/restartsrv_apache_php_fpm
  </code></pre>
  
  <p>It's interesting since there are a broad variety of issue that seem to cause this <code>No input file specified</code> issue, but they all mostly revolve around Apache config issues.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-01T14:00:48.493Z
Answers.Text: Answer should be accepted! Thanks
Answers.UserDisplayName: Yaron U.
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-04T02:26:28.593Z
Answers.LastActivityDate: 2018-08-04T02:26:28.593Z
Answers.UserDisplayName: ylluminate
Body: <p>I have a peculiar situation that is only happening on the root domain and NOT subdomains.</p>
  
  <p>For example, CraftCMS (<em>2.6.3019</em>) running on Apache with <code>php-fpm</code> works fine on <code>dev.some-domain.tld</code> and <code>test.some-domain.tld</code>, but for <code>www.some-domain.tld</code> it fails with:</p>
  
  <p>In browser:</p>
  
  <blockquote>
    <p>No input file specified</p>
  </blockquote>
  
  <p>In cPanel Apache log (<code>/usr/local/apache/error_log</code>):</p>
  
  <blockquote>
    <p>[Fri Aug 03 13:59:12.42352 2018] [proxy_fcgi:error] [pid 31552:tid 132443556343644] [client xxx.xxx.xxx.xxx:55292] AH01071: Got error 'Unable to open primary script: /home/USERNAME/public_html/production/current/html/index.php (No such file or directory)\n'</p>
  </blockquote>
  
  <p>For identical installations for other subdomains, everything loads up and works great.  There is no difference in <code>.htaccess</code> or otherwise.</p>
  
  <p>The only differential that we can figure must be something with how Apache's handling the root document location or permissions for the root domain... but we're not seeing anything.</p>
  
  <p>For good measure, here's the <code>.htaccess</code> contents (that are identical on the working subdomains and this failing root domain):</p>
  
  <pre><code>&lt;IfModule mod_expires.c&gt;
      ExpiresActive On
      ExpiresDefault "access plus 1 year"
  &lt;/IfModule&gt;
  
  &lt;IfModule mod_php5.c&gt;
      php_flag zlib.output_compression on
  &lt;/IfModule&gt;
  
  &lt;IfModule mod_deflate.c&gt;
      AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript
      BrowserMatch ^Mozilla/4 gzip-only-text/html
      BrowserMatch ^Mozilla/4\.0[678] no-gzip
      BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
      SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
      Header append Vary User-Agent env=!dont-vary
  &lt;/IfModule&gt;
  
  &lt;IfModule mod_rewrite.c&gt;
      RewriteEngine On
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
      RewriteRule (.+) index.php?p=$1 [QSA,L]
      RewriteCond %{HTTP_HOST} !^www\. [NC]
      RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
      RewriteCond %{HTTPS} !=on
      RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>I thought that perhaps it was the <code>cgi.fix_pathinfo=1</code> setting for the <code>php.ini</code>, but that also didn't resolve this.</p>
  
  <p>cPanel support is saying it is absolutely a code issue, but we're pretty much convinced it's an Apache / cPanel issue.  It would be nice to have some input on this since this particular incident of <code>No input file specified</code> does not seem to match the others already found here and elsewhere on the web.</p>
  
Tags: <error-message><htaccess><apache>
Title: No input file specified - [proxy_fcgi:error] Got error 'Unable to open primary script: [PATH]/html/index.php (No such file or directory)\n'
ThreadText: # No input file specified - [proxy_fcgi:error] Got error 'Unable to open primary script: [PATH]/html/index.php (No such file or directory)\n'
  
  (Asked by: username_0 on 2018-08-03)
  
  I have a peculiar situation that is only happening on the root domain and NOT subdomains.
  
  For example, CraftCMS (*2.6.3019*) running on Apache with `php-fpm` works fine on `dev.some-domain.tld` and `test.some-domain.tld`, but for `www.some-domain.tld` it fails with:
  
  In browser:
  
  > No input file specified
  
  In cPanel Apache log (`/usr/local/apache/error_log`):
  
  > [Fri Aug 03 13:59:12.42352 2018] [proxy\_fcgi:error] [pid 31552:tid 132443556343644] [client xxx.xxx.xxx.xxx:55292] AH01071: Got error 'Unable to open primary script: /home/USERNAME/public\_html/production/current/html/index.php (No such file or directory)\n'
  
  For identical installations for other subdomains, everything loads up and works great. There is no difference in `.htaccess` or otherwise.
  
  The only differential that we can figure must be something with how Apache's handling the root document location or permissions for the root domain... but we're not seeing anything.
  
  For good measure, here's the `.htaccess` contents (that are identical on the working subdomains and this failing root domain):
  
  ```
  <IfModule mod_expires.c>
      ExpiresActive On
      ExpiresDefault "access plus 1 year"
  </IfModule>
  
  <IfModule mod_php5.c>
      php_flag zlib.output_compression on
  </IfModule>
  
  <IfModule mod_deflate.c>
      AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript
      BrowserMatch ^Mozilla/4 gzip-only-text/html
      BrowserMatch ^Mozilla/4\.0[678] no-gzip
      BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
      SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
      Header append Vary User-Agent env=!dont-vary
  </IfModule>
  
  <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_URI} !^/(favicon\.ico|apple-touch-icon.*\.png)$ [NC]
      RewriteRule (.+) index.php?p=$1 [QSA,L]
      RewriteCond %{HTTP_HOST} !^www\. [NC]
      RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
      RewriteCond %{HTTPS} !=on
      RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
  </IfModule>
  
  ```
  
  I thought that perhaps it was the `cgi.fix_pathinfo=1` setting for the `php.ini`, but that also didn't resolve this.
  
  cPanel support is saying it is absolutely a code issue, but we're pretty much convinced it's an Apache / cPanel issue. It would be nice to have some input on this since this particular incident of `No input file specified` does not seem to match the others already found here and elsewhere on the web.
  
  **Tags:** error-message, htaccess, apache
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2018-08-04. Score: 7 | Accepted answer
  
  It turned out that the problem was from customizing the domain's document root in the userdata files and then the PHP-FPM configuration had not been rebuilt and the service not restarted. The following resolved the issue:
  
  ```
  /scripts/php_fpm_config --rebuild
  /scripts/restartsrv_apache_php_fpm
  
  ```
  
  It's interesting since there are a broad variety of issue that seem to cause this `No input file specified` issue, but they all mostly revolve around Apache config issues.
  
  > **Comments:**
  > **username_1**: Answer should be accepted! Thanks  
  
  ---
  
  