[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: restricting web page access

Tell me if this helps


How do I set up Apache to allow access to certain documents only if a site is either a local site or the user supplies a password and username? Use the Satisfy directive, in particular the Satisfy Any directive, to require that only one of the access restrictions be met. For example, adding the following configuration to a .htaccess or server configuration file would restrict access to people who either are accessing the site from a host under domain.com or who can supply a valid username and password:

Deny from all
Allow from .domain.com
AuthType Basic
AuthUserFile /usr/local/apache/conf/htpasswd.users
AuthName "special directory"
Require valid-user
Satisfy any

See the user authentication question and the mod_access module for details on how the above directives work

Believe in the power Linux and Google
          /     \
         //  _  \\
        | \     )|_
       /`\_`>  <_/ \

Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp