Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How to prevent Apache from listing directory contents?

changhaichanghai Member Posts: 24
Hi, fellow programmers, does anyone remember how to prevent Apache from listing directory contents? I know adding a dummy index.html file to each of the directory will do the job, but there is a way to configure Apache so it will not list directory contents by default, anyone remember how to do it? Thanks a lot.

Comments

  • changhaichanghai Member Posts: 24
    In case someone else has the same problem, edit the httpd.conf file (usually located in /etc/httpd/), change the line
    Options Indexes ...
    associated to your web root directory to
    Options None
    and restart Apache. Cheers!
Sign In or Register to comment.