
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?
Comments and replies About how to disable apache file and directory indexing?
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
apacher:
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
Angel:
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.