Restricting access to directories that have no index

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Restricting access to directories that have no index

Postby Toby B. » 09. January 2005 06:00

Ok, here is what I am looking to do..

1.) prevent access to directories that have no index file (i.e. index.html or index.php). So that people cannot see the directories and are greeted with a "Access Denied"....

For example

Access granted to:
www.mysite.com/images/image01.jpg

But is the person tried to view:
www.mysite.com/images/
they would be unable to view the directory...


I would like to set this up so that is server wide, not per directory...

Make sense?
Toby B.
 
Posts: 7
Joined: 21. March 2004 14:18
Location: Maine, USA

Postby Dave_L » 09. January 2005 11:00

In your Apache httpd.conf file, remove the Indexes attribute from the Options directive(s).

For example, change:
Code: Select all
Options Indexes FollowSymLinks MultiViews Includes ExecCGI

to:
Code: Select all
Options FollowSymLinks MultiViews Includes ExecCGI
.

Reference: http://httpd.apache.org/docs-2.0/mod/core.html#options
User avatar
Dave_L
 
Posts: 212
Joined: 23. October 2004 00:43

Postby Toby B. » 09. January 2005 11:43

Thanks for the speedy reply... :wink:
Toby B.
 
Posts: 7
Joined: 21. March 2004 14:18
Location: Maine, USA


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 133 guests