|
|
Allow Authentication to one or more files
In order to allow access to one specific and deny access to the rest of the document root you will require the "Satisfy Any" clause. This will grant access to specific files/directories even if security is enabled on the rest of the structure.
- Enable the security on the directory. In this example the top level directory.
< Directory "/" >
allow from all
AllowOverride All
Options +Indexes
AuthType Basic
AuthName "Authentication Required"
AuthUserFile /scripts/.htaccess
Require valid-user
< /Directory >
- If you require your clients to access a file (ie: info.htm) that resides within the "/" directory you will need to use a "Files" acl (access control list) to permit access. The "Satisfy Any" statement is required as this will instruct the webserver that anyone can access "info.htm" even with authentication turned on.
< Files info.htm >
Satisfy Any
AllowOverride None
Order allow,deny
Allow from all
< /Files >
|
|
|