Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Require authentication for all but one file in a directory 1

Status
Not open for further replies.

Gertrude12

IS-IT--Management
Feb 24, 2005
3
US
I have a problem that I have been unable to find the answer to anywhere else, so I am hoping someone here will be able to help. My DocumentRoot (/Files) contains 23 sub-directories and 34 files. I have apache configured to require authenticated users on the entire directory; however I would like to allow the general public access to one file (info.htm) without entering a username and password. This is my current configuration:



<VirtualHost *:80>
DocumentRoot /Files
ServerName Webserver
ServerAdmin Admin

<Directory "/">
allow from all
AllowOverride All
Options +Indexes
AuthType Basic
AuthName "Authentication Required"
AuthUserFile /scripts/.htaccess
Require valid-user

</Directory>

</VirtualHost>


I have tried using the <files> directive without luck. Any help is greatly appreciated.
 
I have tried that and didn't have any luck. Thanks for the quick reply!

Any other thoughts?
 
I forgot a statement. Add this "Satisfy Any".

<Files info.htm>
Satisfy Any
AllowOverride None
Order allow,deny
Allow from all
</Files>

Tested and worked on my system.


Michael


WarpZero Technologies
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top