title: Laravel deployment configuration
body: <p>In my <code>httpd.conf</code> file I have:</p>
  
  <pre><code>DocumentRoot /var/www/my-domain.com/public
  ServerName my-domain.ir
  &lt;Directory /var/www/my-domain.com/public&gt;
  DirectoryIndex index.php
  Options All
  AllowOverride All
  Require all granted
  &lt;/Directory&gt;
  </code></pre>
  
  <p>and in my <code>laravel_project_root/public</code> directory I have an <code>.htaccess</code> file which has:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      &lt;IfModule mod_negotiation.c&gt;
          Options -MultiViews -Indexes
      &lt;/IfModule&gt;
  
      Options +FollowSymLinks
  
      RewriteEngine On
  
      # Force http to https
      #RewriteCond %{HTTPS} off
      #RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  
      # Handle Authorization Header
      RewriteCond %{HTTP:Authorization} .
      RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  
      # Redirect Trailing Slashes If Not A Folder...
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_URI} (.+)/$
      RewriteRule ^ %1 [L,R=301]
  
      # Handle Front Controller...
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^ index.php [L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>and the result is:</p>
  
  <p><strong>Service Unavailable</strong></p>
  
  <p>The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.</p>
  
  <p>When I use an <code>index.html</code> file and change that <code>DirectoryIndex index.php</code> to <code>DirectoryIndex index.html</code> it works! but I don't know what is my fault in these configurations that php files doesn't load.</p>
  
  <p>Any suggestion would be appreciated.</p>
  
  <p><strong>Update</strong>
  <code>error_log</code></p>
  
  <pre><code>[Wed Feb 06 09:42:15.751947 2019] [suexec:notice] [pid 50730] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
  [Wed Feb 06 09:42:15.812330 2019] [auth_digest:notice] [pid 50730] AH01757: generating secret for digest authentication ...
  [Wed Feb 06 09:42:15.813030 2019] [lbmethod_heartbeat:notice] [pid 50730] AH02282: No slotmem from mod_heartmonitor
  [Wed Feb 06 09:42:16.000310 2019] [mpm_prefork:notice] [pid 50730] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_fcgid/2.3.9 PHP/7.2.14 configured -- resuming normal operations
  [Wed Feb 06 09:42:16.000381 2019] [core:notice] [pid 50730] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
  [Wed Feb 06 09:42:21.644207 2019] [proxy:error] [pid 50732] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
  [Wed Feb 06 09:42:21.644312 2019] [proxy_fcgi:error] [pid 50732] [client 2.176.232.178:61732] AH01079: failed to make connection to backend: 127.0.0.1
  [Wed Feb 06 09:42:22.552480 2019] [proxy:error] [pid 50734] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
  [Wed Feb 06 09:42:22.552599 2019] [proxy_fcgi:error] [pid 50734] [client 2.176.232.178:61733] AH01079: failed to make connection to backend: 127.0.0.1
  [Wed Feb 06 09:42:23.256763 2019] [proxy:error] [pid 50735] (111)Connection refused: AH00957: FCGI: attempt to connect to 127.0.0.1:9000 (*) failed
  [Wed Feb 06 09:42:23.256860 2019] [proxy_fcgi:error] [pid 50735] [client 2.176.232.178:61734] AH01079: failed to make connection to backend: 127.0.0.1
  </code></pre>