Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 05-23-2004, 06:48 AM   #1
Registered: Apr 2004
Posts: 340

Rep: Reputation: 30
Stop directory listings in Apache


I am new to Apache.
I have it up and running on Red Hat 9.
I have a bunch of web sites on this system.

How do I do this:

1. Prevent anyone from getting a directory listing
of any directories under "/var/www/html"

2. If any directory does not contain an "index.html"
file then my default "/var/www/html/nopage.html"
should be displayed instead.

Very often I change the contents of the
"/var/www/html/nopage.html" file so I
would like to maintain only one copy of this file.

Old 05-23-2004, 09:57 AM   #2
LQ Guru
Registered: Jan 2001
Posts: 24,147

Rep: Reputation: 229Reputation: 229Reputation: 229
Got to love the docs over at
Old 05-23-2004, 10:17 AM   #3
LQ Newbie
Registered: Mar 2004
Location: IITKanpur,India
Posts: 24

Rep: Reputation: 15
you may put a index.php (or index.html) in the required deirectory which will redirect the user to some error page.

Apache site has this redirecting thing very well explained. I dont remember exactly where it is, 'cause I saw it as a tip while validating my web-site at


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache Directory Listing Of NFS Mount, cannot view directory list via apache luqmana Linux - Networking 2 12-19-2005 07:03 AM
vsftpd on Fedora 4 - empty/incomplete directory listings REdward Linux - Networking 0 08-19-2005 05:56 PM
Directory/File Listings AndeAnderson Debian 7 02-24-2005 01:59 AM
Apache directory listings Boffy Linux - Networking 8 04-30-2004 05:47 AM
SLOW everything is SLOW - Even directory listings! astroboy5714 Linux - Networking 1 01-25-2004 09:31 PM

All times are GMT -5. The time now is 07:10 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration