Re: [squid-users] How to deny unmatched/unspecified domains in squid 2.6 under reverse proxy mode?

From: Chris Robertson <crobertson@dont-contact.us>
Date: Mon, 16 Oct 2006 13:43:18 -0800

Nguyen, Khanh, INFOT wrote:
> hi,
>
> I have squid 2.6 on Linux OS. The squid cache is configured in reverse proxy mode, means each domain has a mapping web server for objects retrieval. For example: objects of www1.mycompany.com will be fetched from websever1.mycompany.com, objects of www2.mycompany.com will be fetched from webserver2.mycompany.com ...
>
> For domains that are NOT configured in the cache server, the squid cache uses first_up_parent, sometime webserver1.mycompany.com, other time webserver2.mycompany.com. This is NOT what I desire. Can the squid cache be configured to return error page or acl denied page if a request is for a domain that is not configured in the squid cache server? If I use acl to achieve this, would i have to one allowed acl for each configured domain and then deny at the very end? It does not sound very effective since I would have a very long acl list. My cache server would have over 100 domains thus 100+ acl. Is there any better way without modifying the code itself?
>
> Any suggestions would be very much appreciated.
> Khanh
>
>
>
acl KnownHosts dstdomain "/path/to/file"
http_access deny !KnownHosts

Where "file" would contain the allowed domains, one per line with an
optional leading dot to match all subdomains. Be sure that this
http_access deny is entered before any explicit allows in your squid.conf.

Chris
Received on Mon Oct 16 2006 - 15:43:45 MDT

This archive was generated by hypermail pre-2.1.9 : Wed Nov 01 2006 - 12:00:04 MST