Re: [squid-users] http_access .. please help (Top Urgent)

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Wed, 18 Feb 2004 07:58:01 +0100 (CET)

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
Received on Tue Feb 17 2004 - 23:58:12 MST

This archive was generated by hypermail pre-2.1.9 : Mon Mar 01 2004 - 12:00:02 MST