On Tue, Jan 06, 2004 at 04:02:00PM +0100, Ken wrote:
The howtos I have read are just not clear enough for me about the redirector script/program needed to rewrite URLs. Must I install a program like Squirm or pyredir just to change incoming requests for 'http://mysite.com' to 'http://123.45.678.9:81/somedir'? Or can this be done with one line in squid.conf (I hope)?
I use a single squid instance as an accelerator front-end to a Zope instance that handles several virtual hosts (via VHM), using squid's "cache_peer" mechanism. In your case this most pertinent config lines would be something like this: cache_peer localhost parent 81 0 no-query default cache_peer_access localhost allow mysite.com That way squid forwards to zope (port 81 on localhost) all HTTP traffic destined for the 'mysite.com' virtual host. Other squid HTTP-acceleration parameters must also be set as usual for this to work. (I think -- my squid instance also uses a 'redirect_program' to forward some traffic to back-end HTTP servers other than Zope and I forget which config parameters apply to redirection and which to cache-peering.) I'll attach a sanitized version of my config file to this note. BEWARE: this truncated configuration might have security holes. -- Fred Yankowski fred@ontosys.com tel: +1.630.879.1312 OntoSys, Inc PGP keyID: 7B449345 fax: +1.630.879.1370 www.ontosys.com 38W242 Deerpath Rd, Batavia, IL 60510-9461, USA