Hello! I am trying to set up Squid as reverse proxy for Zope. My requirement is pretty minimal: Zope and Squid are on the same machine and serve only one domain. However, due to the combination of Products I am using, the main directory of my website cannot be the root directory and I have used a VHM. 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)? Thanks for helping! Ken
Redirecection in always handled outside Squid. As you can see in squid.conf you have to pass the name of the external program. -aj --On Dienstag, 6. Januar 2004 16:02 Uhr +0100 Ken <ken@p11.org> wrote:
Hello!
I am trying to set up Squid as reverse proxy for Zope. My requirement is pretty minimal: Zope and Squid are on the same machine and serve only one domain. However, due to the combination of Products I am using, the main directory of my website cannot be the root directory and I have used a VHM.
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)?
Thanks for helping!
Ken
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
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)?
If all you do is redirect a few hosts and your rewriting needs are simple there is no need for a redirector. Simply do this: - in the /etc/hosts of your Squid machine set the IP address for the hostname you're dealing with to the internal address where Zope listens - put a VirtualHostMonster in the root of your ZODB and use the "Mappings" tab to define a simple mapping like... www.myhostname.com /path/to/site voila. jens
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
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.
What are the advantages of Squid over Apache? Apache can also rewrite URLs, but is Squid better/faster? Tim
--On Dienstag, 6. Januar 2004 17:36 Uhr +0100 Tim Terlegård <tim@se.linux.org> wrote:
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.
What are the advantages of Squid over Apache? Apache can also rewrite URLs, but is Squid better/faster?
Apache is the poor-mens-solution. Use Squid for sophisticated enterprise-level solutions. -aj
On Tue, Jan 06, 2004 at 05:36:48PM +0100, Tim Terleg?rd wrote:
What are the advantages of Squid over Apache? Apache can also rewrite URLs, but is Squid better/faster?
I chose it over Apache for its industrial-strength caching features, to accelerate access to the HTTP services hosted on the server. Also, Zope news announcements at the time (several years ago) made me think that Squid front-ends to Zope would be getting a lot of attention and improvement from Zope Corporation. I wonder what became of the "ESI" initiative? (http://www.zope.com/News/PressReleases/OpenSourceESI) -- 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
participants (5)
-
Andreas Jung -
Fred Yankowski -
Jens Vagelpohl -
Ken -
Tim Terlegård