Sat, 01/05/2010 - 18:39 — horuskol
This should be fairly useful - it sets up a trusted connection (always allow access to people on a specific network) and requires authentication for anyone else outside of that network.
Satisfy any Order deny,allow Deny from all Allow from 192.168.1 AuthUserFile /var/www/your-website/.htpasswd AuthType Basic AuthName "Authentication Required" Require valid-user
Satisfy Directive
The Satisfy directive is required to allow Apache to skip the user authentication if the preceding Allow directives are met - thereby setting up the trusted connection. If you are accessing the site from outside the trusted network, then you will be asked to authenticate.
If the Satisfy directive is left to its default value of 'all' then the access requirement is changed subtly. Nobody outside the allowed network will be able to access the site at all. And everyone on the allowed network will also be required to login.