How to enable a directory listing in Apache web server
<p>I am not able to enable directory listing in my Apache web server. I have tried various solutions posted, but it is not working. I just freshly installed httpd 2.4.6 and enabled HTTPS using <em>ssl.conf</em> under the <em>/etc/httpd/conf.d/ssl.conf</em> directory and trying to access <a href="https://server.example.com/" rel="noreferrer">https://server.example.com/</a>, but this is not listing the directory. These are the configuration in file <em>ssl.conf</em>:</p>
<pre><code>DocumentRoot &quot;/home/userx/Downloads/&quot;
ServerName server.example.com:443
</code></pre>
<p>Below is what it has in <em>ssl.conf</em> under the VirtualHost element. Files and the first <em>Directory</em> elements were already there when I installed, and I just added <em>Directory</em> for &quot;/home/userx/Downloads&quot;. I want to browse the contents of <em>/home/userx/Downloads</em> when I access the URL <em><a href="https://server.example.com/" rel="noreferrer">https://server.example.com/</a></em>. What am I missing here?</p>
<pre><code>&lt;Files ~ &quot;\.(cgi|shtml|phtml|php3?)$&quot;&gt;
    SSLOptions +StdEnvVars
&lt;/Files&gt;
&lt;Directory &quot;/var/www/cgi-bin&quot;&gt;
    SSLOptions +StdEnvVars
&lt;/Directory&gt;
&lt;Directory &quot;/home/userx/Downloads&quot;&gt;
  Options +Indexes
  AllowOverride all
&lt;/Directory&gt;
</code></pre>