WarpZero RSS WarpZero@Twitter WarpZero@LinkedIn Michael Marth@Facebook Monday, 21-May-2012 01:45:35 EDT
   
warpzero.com

° Home
° News & Updates
° Howto & Knowledge Base
° External Resources
° Contact us
° Search
° Site Validated
° Site Map




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.




  1. 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 >

  2. 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 >


Linux Counter
Apache
IBM Canada
Cisco Systems
RedHat
Linux
 
 Published: Wednesday, 10-Nov-2010 05:04:52 EST