Apache auth question

Glenn Dawson glenn at antimatter.net
Mon Mar 6 12:53:48 UTC 2006


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
>files?

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
</Directory>



>Scott
>_______________________________________________
>freebsd-questions at freebsd.org mailing 
>listhttp://lists.freebsd.org/mailman/listinfo/freebsd-questions
>To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"



More information about the freebsd-questions mailing list