title: Apache directory listing
body: <p>I am unable to stop apache from creating directory listings when using the server IP address. I have tried editing the relevant site-available files as follows;</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      JkMount /* default
      ServerName example.co.uk
      ServerAlias www.example.co.uk
      ServerAdmin me@example.co.uk
      DocumentRoot /var/www/example.co.uk/public_html
      ErrorLog /var/www/example.co.uk/logs/error.log
      CustomLog /var/www/example.co.uk/logs/access.log combined
      &lt;Directory /var/www/example.co.uk/public_html&gt;
          Options -Indexes
      &lt;/Directory&gt;
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>...but the public_html folder contents are being listed if I access the server using a url of this format;</p>
  
  <p><a href="http://192.168.1.99/example.co.uk/public_html" rel="nofollow">http://192.168.1.99/example.co.uk/public_html</a></p>
  
  <p>I have also tried to amend the apache config file at /etc/apache2/apache.conf to include the following;</p>
  
  <pre><code>&lt;Directory /&gt;
      Options -Indexes
  &lt;/Directory&gt;
  </code></pre>
  
  <p>..but no joy. </p>
  
  <p>I am using Tomcat, and I need my WEB-INF folder to deny access. It doesn't, and so any .class files can be downloaded.</p>
  
  <p>Does anyone know how I can fix this?</p>
  
  <p>thanks </p>