title: Rails 403 error when combining with Apache
body: <p>So if I place an <code>index.html</code> file inside of my <code>public/</code> rails folder, I can see the contents. However, if I remove it, then I get the following error from Apache's <code>error.log</code> file:</p>
  
  <pre><code>[Wed Sep 19 22:43:29.802178 2018] [autoindex:error] [pid 52250] [client 172.16.38.1:49395] AH01276: Cannot serve directory /home/user/rails_app/public/: No matching DirectoryIndex (index.html,index.cgi,index.pl,index.php,index.xhtml,index.htm) found, and server-generated directory index forbidden by Options directive
  </code></pre>
  
  <p>Any idea what I might be missing here? I seem to be only one or two steps away from getting Rails to work with Apache. Here's my configuration file for the site:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      DocumentRoot /home/user/rails_app/public
    &lt;Directory /home/user/rails_app/public&gt;
      AllowOverride All
          Options -MultiViews
          Require all granted
    &lt;/Directory&gt;
      ErrorLog /home/user/rails_app/log/error.log
      CustomLog /home/user/rails_app/log/access.log combined
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>What exactly am I missing that's not allowing this process to work? Thanks for any input. </p>
  
  <p>It seems that <code>libapache2-mod-passenger</code> is already installed, but Apache can't load it for some strange reason:</p>
  
  <pre><code>[user:ubuntu:.../rails_app/public]$ sudo apt-get install -y libapache2-mod-passenger
  Reading package lists... Done
  Building dependency tree       
  Reading state information... Done
  libapache2-mod-passenger is already the newest version (1:5.3.4-1~bionic1).
  0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  </code></pre>
  
  <p>but trying to load it doesn't work</p>
  
  <pre><code>[user:ubuntu:.../rails_app/public]$ sudo a2enmod passenger                                                                                                                                                10:54PM/09.19
  ERROR: Module passenger does not exist!
  </code></pre>
  
  <p>Doesn't make any sense to me.</p>