HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Deny directory indexes doesn't work (http://www.howtoforge.com/forums/showthread.php?t=52642)

MacGoose 11th May 2011 19:53

Deny directory indexes doesn't work
 
I'm managing my server using ISPConfig. All the sites set up in ISPConfig have no problems denying directory content. If I create a new directory via ftp I will get a 403 Forbidden trying to access it.

However the default Apache site /var/www, answering on my servers IP adress on a http request, shows all directory content except for some directories like /clients. If I create a new directory via ftp it will be open for directory listing.

I've been setting Options -Indexes in .htaccess files and httpd.conf and indexes are still open.

Any ideas what to do? Am I missing something?

, MacGoose

erosbk 12th May 2011 00:58

You must edit default settings for "default" (directory /var/www/)

In the debian, with default installation with no changes in both files, you can use it... if you have another distro or this is not your scenario, just edit manually (add "-" in Options Indexes for Directory /var/www/)

sed -i 's/Options Indexes/Options -Indexes/1' /etc/apache2/sites-available/default
sed -i 's/Options Indexes/Options -Indexes/1' /etc/apache2/sites-available/default-ssl

Regards

Edit: I am new to this... if this is not the best way, please post! :P

MacGoose 12th May 2011 07:14

Thanx! Worked like a charm. I'm on Ubuntu 10.04 btw...

, MacGoose


All times are GMT +2. The time now is 13:48.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.