Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How do I configure httpd.conf for directory /something to grant access to everybody from 10.0.0.0/8 withOUT password AND to require everybody else coming from whereever to basic authenticate

The goal is simple: Folks from inside my corporate network should be able to access a tiny testsite, whereas folks from outside should only be able to access it, if they know the password. I know, how to achieve either of the two goals, but how to combine them?

Kind regards

share|improve this question

2 Answers 2

The following should do what you are looking for (especially the Satisfy any):

AuthName "..."
AuthType Basic
Require valid-user

Order deny,allow
Allow from x.x.x.x
Deny from all

Satisfy any
share|improve this answer

Create two separate configurations in your httpd.conf and use
RewriteCond %{REMOTE_HOST} ^10.0.0. in passworded location to substitute path for your local users.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.