[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Limiting access to apache proxy server



I am trying to limit (by domain) access to a proxy server.  Basically,
users should be allowed to access domain1.com and domain2.com freely (no
password).  ANY other domain name should require authentication for proxy
access.

Here's what I have come up with so far:

<DirectoryMatch
proxy:http://www.domain1.com/*|proxy:http://www.domain2.com/*>
  order deny,allow
  deny from all
  Allow from 192.168.1.0/24
</DirectoryMatch>

<DirectoryMatch proxy:*??????????>
  order deny,allow
  AuthName Internet
  AuthType Basic
  AuthUserFile /etc/htpasswd
  require user access1 access2 access3
</DirectoryMatch>

In the second DirectoryMatch directive, I need to have the a condition like
this:

if proxy and not proxy:(domain1 or domain2)

I have strained my limits of regex knowledge, could anyone here help me
with this?

TIA,

Fraser


Reply to: