[squid-users] replacing Apache httpd

From: Daniel Plappert <plappert_at_denkformat.de>
Date: Fri, 1 Apr 2011 15:22:29 +0200

Hi all,

I am new to squid, so I hope you don't feel offended if this is a beginner's question. ;-) I am trying to replace a Apache httpd server, who works as a delegating proxy. Let me explain the scenario shortly:

internet -> Apache httpd delegator -> server[1-3]

Because, to the outside, we have just one ip-address, the httpd delegator forwards the request according to the URL to one of the internal server, i.e. wiki.example.com is forwarded to server1, dms.example.com is forwarded to server2. This is done with virtual-hosts and rewrite rules, i.e. for server1:

   RewriteRule ^(.*)$ http://wiki/$1 [L,P]

As you can see here, the request is delegated to an internal server called wiki.

What I am trying to do now is to replace the Apache httpd delegator with squid. What I've done so far is to configure squid as an accelerator and declared the corresponding nodes:

acl wiki_sites dstdomain wiki.example.com
http_port 80 accel defaultsite=example.com vhost
http_access allow wiki_sites
cache_peer wiki parent 80 0 no-query originserver forceddomain=wiki name=wiki
forwarded_for on
cache_peer_access wiki allow wiki_sites

Forwarding the request works as expected, but there is one problem: server1 (the (t)wiki server) adds now a wrong base url in the html header:

<base href="http://wiki" />

This doesn't happen with the apache delegator.

So, finally my question: how is it possible to configure squid, in a way that the base url is as it was before: <base href="http://wiki.example.com" /> I need the URL from the outside (internet), not from the internal (intranet).

I really appreciate your help. Thanks a lot.

Best regards,
Daniel
Received on Fri Apr 01 2011 - 13:22:36 MDT

This archive was generated by hypermail 2.2.0 : Sun Apr 03 2011 - 12:00:01 MDT