On Wed, 18 Feb 2004, Winanjaya wrote:

> I only allow some address to access 2 spesific URLs. my acl & http_access
> goes below is my etc/squid.conf:
> 
> acl brata       src 172.16.2.11
> acl farina      src 172.16.2.21
> acl meike1      src 172.16.2.32
> acl meike2      src 172.16.2.52
> 
> acl polisy2000acl1 url_regex ^http://polisy2000.lippogeneral.com/$
> acl p2kas1 url_regex ^http://p2kas/$
> 
> http_access allow brata polisy2000acl1  p2kas1

This won't work. This says that access should be allowed it the URL 
matches both polisy2000acl1 and p2kas1 at the same time.

Either place both patterns in the same url_regex acl, or use two 
http_access lines, one per url_regex.


And are you really sure you want such very restricted access? This only 
allows access to that specific URL, not any images or other inlined 
objects, or any linked pages on the same servers..

Maybe what you are actually looking for is the dstdomain acl type?


Merging many things into a single acl also works for your src acls.

acl sites dstdomain polisy2000.lippogeneral.com p2kas

acl users src 172.16.2.11 172.16.2.21 172.16.2.32 172.16.2.52

http_access allow users sites

Regards
Henrik

Reply via email to