Apache auth question
cscotts at mindspring.com
Tue Mar 7 07:49:36 UTC 2006
On Mar 6, 2006, at 6:52 AM, Glenn Dawson wrote:
> At 03:56 AM 3/6/2006, Scott Sipe wrote:
>> I am dealing with a company LAN that lives behind an OpenBSD based
>> firewall+NAT machine. All internal machines have 10.x.x.x addresses.
>> One of the internal machines acts as an intranet webserver. Everyone
>> in the building should be able to access it.
>> I would ALSO like to expose it to the outside, and have outside
>> requests authenticate. So everyone with a 10.x.x.x still has no
>> limits, and external addresses after authenticating with a
>> username/ password have full access. Is this possible to do with
>> apache2 config
> Something like this should do what you want:
> <Directory /docroot>
> AuthType basic
> AuthName "foo"
> AuthUserFile /path/to/htpasswds
> Order Deny,Allow
> Deny from all
> Require valid-user
> Allow from 10.0.0.0/16
> Satisfy any
That got it perfectly, adding the "Satisfy any" line was what I had
been missing.. thanks much!
More information about the freebsd-questions