0

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

fsg
  • 1

2 Answers2

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
Oliver
  • 5,973
  • 24
  • 33
0

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.

DukeLion
  • 3,259
  • 1
  • 18
  • 19