LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices

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

Rep: Reputation: 30
Stop directory listings in Apache


Hi,

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.


Thanks.
 
Old 05-23-2004, 08:57 AM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
Got to love the docs over at apache.org.. http://httpd.apache.org/docs/mod/mod_autoindex.html
 
Old 05-23-2004, 09:17 AM   #3
djadhav
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 validator.w3.org
 
  


Reply


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 06:03 AM
vsftpd on Fedora 4 - empty/incomplete directory listings REdward Linux - Networking 0 08-19-2005 04:56 PM
Directory/File Listings AndeAnderson Debian 7 02-24-2005 12:59 AM
Apache directory listings Boffy Linux - Networking 8 04-30-2004 04:47 AM
SLOW everything is SLOW - Even directory listings! astroboy5714 Linux - Networking 1 01-25-2004 08:31 PM


All times are GMT -5. The time now is 03:38 AM.

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