Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7605449
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T00:10:14+00:00 2026-05-31T00:10:14+00:00

I am unable to stop apache from creating directory listings when using the server

  • 0

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;

<VirtualHost *:80>
    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
    <Directory /var/www/example.co.uk/public_html>
        Options -Indexes
    </Directory>
</VirtualHost>

…but the public_html folder contents are being listed if I access the server using a url of this format;

http://192.168.1.99/example.co.uk/public_html

I have also tried to amend the apache config file at /etc/apache2/apache.conf to include the following;

<Directory />
    Options -Indexes
</Directory>

..but no joy.

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.

Does anyone know how I can fix this?

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T00:10:15+00:00Added an answer on May 31, 2026 at 12:10 am

    This means that it will not reach your VirtualHost settings, but default virtual host settings.

    You have 2 options (at least):

    1, put .htaccess file to your directory for which you want to restrict listing

    2, Setup you IP based virtual host with similar settings as your name-based vhosts

    You said that you put

    <Directory />
        Options -Indexes
    </Directory>
    

    You should have Location instead of Directory there

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Error: Unable to read data from the transport connection: A blocking operation was interrupted
I am unable to consume messages sent via ActiveMQ from my Flex client. Sending
I have been unable to receive UDP multicast under VxWorks 5.5. I've joined the
Why is the compiler unable to infer the correct type for the result from
I have been unable to trigger an onselect event handler attached to a <div>
Most IBM (and some Dell) laptops have built-in accelerometers to stop any moving parts
I'm using slidesjs to create 5 different slideshows/galleries on a single-page site. They all
Unable to scroll pages vertically on Google Chrome 12.0.742.100, using the scroll-bar thumb, however
Hi I am developing a game using libgdx framework, in that i am unable
I have been searching for quite a while now but i am unable to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.