how to disable apache file and directory indexing?

Mobile
feeds
Welcome Login | Register

how to disable apache file and directory indexing?
Reply Your Comments:
Click this button if you are interested in replying to this topic and leave your comments
Sent To Friend
CLick this button if you want to send this page to a friend.
Subsribe To Rss Feeds
Subscribe to RSS
CLick this button if you want to subscribe to this RSS Feed. You can use your browsers feeds burners if you have mozilla or internet explorer 7 or higher and keep up with updates.
  Forums Index
      » Linux Hosting Forums
        » » how to disable apache file and directory indexing?
how to disable apache file and directory indexing?
Post Description: how to disable apache file and directory indexing Linux Hosting
Post Tags:
This Post Has Been Viewed 411 Times Since Thu Sep 04, 2008 3:59 am Author apache server with 3 replies
Next Post »» how to search and replace text with linux VI editor
how to disable apache file and directory indexing?
Advertise On This Page




20080904-apache-index.jpg
today i noticed something of a security issue with my apacher server. i have a linux (unix) machine running fedora core 7 from RedHat and i noticed that when i go to a url that doesn't have an index file like index.html, or index.htm or index.php and so on, it show/displays all the files in that directory. well, i want to be able to hide all these files and instead show something else, like an error or something. i think this is error 404

anyway, this is how my page looks like, as you can see, it shows and displays my files, which i dont want them to be shown to my visitors. as you can see from this picture, is says:

index of /forums/images/ and parent directory and it lists all my files, i want to avoid having to list my files.

how do i do this?




Leave Your Comments

Your Name
Your Email Address (Will Not Be Published)
Notify Me When Someone Replies to this Page
(An email will be sent to you when someone replies to your comments)
Your Comments
Include A Picture with your comments
Share
| More
Share this page by putting this URL in your comments to other websites like myspace, Facebook, Twitter friendster, Hi5, Groups, Boards, Forum or others. Just Copy and Paste this Code
URL:
To embed this topic, just copy the code from the "Embed" box. Once you've copied the code, just paste it into your website or blog to embed it.
Embed:
BBCODE is use on forums. You can put this code on all your BBCODE enabled forums like PhpBB, vBulletin® and others. Just Copy and Paste this code on your Posts and Replies on your forums
BBCODE:
Subscribe Feeds
Webmasters - Exchange Links With Us. Add related websites to this topic
Add Link:
Links Related to : how to disable apache file and directory indexing?

Comments and replies About how to disable apache file and directory indexing?
:: 1 :: Reply #69297 Reply By hostman On Thu Sep 04, 2008 4:23 am
hostman:
yes, i have a wallpaper website also, i had to actually make the changes on my httpd.conf file in my apacher linux server.

i have fedora core 7 also, and what i had to do was make some changes on my httpd.conf file located at:

/etc/httpd/conf/httpd.conf

so this is what i did:

1. login as root
2. send this command:
nano /etc/httpd/conf/httpd.conf

3. find your virtual host for yoru site and replace this line:
Options +Indexes +FollowSymLinks

4. with this:
Options +Includes -Indexes

5. save my changes
6. restart apache server:
/etc/init.d/httpd restart


DONE

hope this helps
:: 2 :: Reply #69300 Reply By apacher On Thu Sep 04, 2008 4:35 am
apacher:
20080904-69300-apache-forbidden.jpg
thanks for helping me, i was able to fix it, it was just what i was looking for, now i see a forbidden message instead of the listing of all my files..

thank you
:: 3 :: Reply #108444 Reply By Angel On Mon Jul 06, 2009 6:25 am
Angel:
06-6331-images.jpeg
to solve this issue you need to modify your httpd.conf file as follow:

search <directory must have the path to the directory root for public files, and change the options line to options none.