Re: [SQU] Transparent Proxy + Accelerator

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sat, 16 Sep 2000 19:19:23 +0200

Lane@SquareOneDesigns.com wrote:
>
> I've already read section 20 of the FAQ (httpd-accelerator mode), but
> I'm not knowledgeable enough to make sense of what's going on with my
> configuration.
>
> I have attempted to configure my single server to provide transparent
> proxy for my internal network, and to serve web pages for my web
> server. I have a very simple net...

Try this:

httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_uses_host_header on

redirect_program /path/to/the/perl/program/below

acl from_my_network src 192.168.0.0/16
acl to_my_network dst 192.167.0.0/16
acl to_my_web_server dst internal.web.server

http_access deny to_my_network !to_my_web_server
http_access allow from_my_network

--- accelerator.pl ---
#!/usr/sbin/perl
$|=1;
while(<>) {
# Rewrite accelerated requests without a host header
s%^http://ip.for.squid.server%http://internal.web.server% && next;
# Rewrite accelerated requests with a host header
s%^http://squareonedesigns.com%http://internal.web.server% && next;
} continue {
print;
}
--- end of accelerator.pl ---

--
Henrik Nordstrom
Squid hacker
--
To unsubscribe, see http://www.squid-cache.org/mailing-lists.html
Received on Sat Sep 16 2000 - 11:32:29 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:55:20 MST