1. Outside users must have valid user/pass to access specific areas, meanwhile LAN users has free access to that area
2. Free accessible area for outside and LAN users
3. Obligatory restricted area - must have valid user/pass combination
Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny9 with Suhosin-Patch mod_perl/2.0.4 Perl/v5.10.0 Server at example.org Port 80
LAN 192.168.10.0/24
AAA - static (htpasswd)
K0b3 recommends to use Satisfy apache directive
AuthType Basic
AuthName WorkPlace
Require valid-user
Order allow,deny
Allow from 192.168.10.0/24
Satisfy any
### free for all without password
Allow from all
Satisfy any
### Passwd authentication for all!
< Directory /var/www/wp/admin >
AuthType Basic
AuthName WorkPlace_Admin_Area
Require valid-user
### Can be avoided for simplicity
Allow from 192.168.10.0/24
### Can be avoided for simplicity
Satisfy all
< /Directory >
Allow <-> Deny are obeying the following rules (according Apache's site)
->
Match | Allow,Deny result | Deny,Allow result |
---|---|---|
Match Allow only | Request allowed | Request allowed |
Match Deny only | Request denied | Request denied |
No match | Default to second directive: Denied | Default to second directive: Allowed |
Match both Allow & Deny | Final match controls: Denied | Final match controls: Allowed |