title: What causing this error proxy_fcgi:error] AH01071: Got error 'Primary script unknown'
body: <p>I'm getting the proxy_fcgi:error] AH01071: Got error 'Primary script unknown' error very frequently. Can anyone tell me what causing this error. What I learned so far is Rewrite rule may cause this issue. But do not understand exactly what causing this issue. Following are my Rewrite rules:</p>
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerName example.com
      ServerAlias www.example.com
  
      ServerAdmin webmaster@localhost
      DocumentRoot /var/www
  
      &lt;Directory /var/www/&gt;
          Options -Indexes +FollowSymLinks -MultiViews
          AllowOverride None
          Require all granted
  
          # Setting rewrite rules
          RewriteEngine on
          RewriteBase /
     
          RewriteCond %{HTTPS} off [OR]       
          RewriteCond %{HTTP_HOST} !^www\.example\.com [NC]
          RewriteRule (.*) https://www.example.com/$1 [R=301,L]
  
          # Show 404 error if there is any slash after page name
          RewriteRule ^.+?\.(php|html?)/ - [L,R=404,NC]
  
          # Custom Directory Index Files
          DirectoryIndex index.php index.html
      &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  
  
  &lt;IfModule mod_ssl.c&gt;
  &lt;VirtualHost *:443&gt;
      ServerName example.com
      ServerAlias www.example.com
  
      ServerAdmin webmaster@localhost
      DocumentRoot /var/www
  
      &lt;Directory /var/www/&gt;
          Options -Indexes +FollowSymLinks -MultiViews
          AllowOverride None
          Require all granted
  
          # Setting rewrite rules
          RewriteEngine on
          RewriteBase /
  
          RewriteCond %{HTTP_HOST} ^example.com$ [NC]
          RewriteRule (.*) https://www.example.com/$1 [R=301,L]
          
          # Show 404 error if there is any slash after page name
          RewriteRule ^.+?\.(php|html?)/ - [L,R=404,NC]
  
          # Custom Directory Index Files
          DirectoryIndex index.php index.html
      &lt;/Directory&gt;
  
  Include /etc/letsencrypt/options-ssl-apache.conf
  SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem
  SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
  &lt;/VirtualHost&gt;
  &lt;/IfModule&gt;
  </code></pre>