[Zope] name based virtual hosts with squid

sebas ICK sebas@ick-kupplungen.de
Wed, 14 Nov 2001 16:00:11 -0800


I want to use squid as a front end server indeed and hide zope and apache
behind it. Squid can do some security checks and advanced caching for
frequently requested site.

I wonder why it is this badly (maybe not at all) documented how to handle
multiple backend servers with squid.

This a cleaned up version of the *relevant* part of my squid.conf:

-------------------------------

# set port where squid listens to, enable logging
http_port 131.174.168.120:80
emulate_httpd_log on

# set security checks off for debugging purposes
http_access allow all

# define virtual hosts for zope and apache
httpd_accel_uses_host_header on
httpd_accel_host zopedev.dhs.org   #redirect this to apache on port 90
httpd_accel_port 90
httpd_accel_host zopedev-alpha.dhs.org   #redirect this to zope on port 8080
httpd_accel_port 8080


-------------------------------

Maybe someone got another approach?

kind regards,

sebas.


----- Original Message -----
Sent: Wednesday, November 14, 2001 3:10 AM
Subject: Re: [Zope] name based virtual hosts with squid


If I understand you correctly, you want to hide Apache and Zope behind
Squid. If you want Squid to rewrite incoming URLs as appropriate to either
the Apache or Zope server you will need to provide what is referred to in
Squid documentation  as a Redirector program. This program/script, which
you must supply, can rewrite the incoming URLs using whatever
transformation rules you choose to program. The effect is equivalent to
using ProxyPass and RewriteCond/RewriteRule with Apache.

See the Squid documentation http://www.squid-cache.org/Doc/FAQ/FAQ-15.html
for more information.

Then again why use Squid? You could achieve similar objectives by having
Apache ProxyPass/Rewrite directives to rewrite URLs to the Zope server. See
this list's archives for postings on this subject. Then again Squid would
probably work better with a high traffic levels.

At 22:13 13/11/2001 -0800, Sebastian Kügler wrote:
>Hi group,
>
>Here's my problem, maybe someone's got better idea's ...
>
>I want to use squid to server apache and zope on one port. domains under
>zope.domain.org have tp be served by zope and domains with www.domain.org
by
>apache. I have the following in my squid.conf;
>
>-----------------------------------------------------
>
>httpd_accel_uses_host_header on
># added port 80 here to listen to port 80 (doH!) edited by sebas
>  http_port 80
>  emulate_httpd_log on     # use NCSA https style logfile
>
># http_access allow all
>  httpd_accel_host zopedev.dhs.org
>  httpd_accel_host virtual
>  httpd_accel_port 90    # port where Apache is running
>
># added port 80 here to listen to port 80 (doH!) edited by sebas
>  http_port 80
>  emulate_httpd_log on     # use NCSA https style logfile
># this line replaces 'http_access deny all'
># http_access allow all
>  httpd_accel_host zopedev-alpha.dhs.org
>  httpd_accel_host virtual
>  httpd_accel_port 8080    # port where Zope is running
>
>-------------------------------------------------------
>
>As some of you might already have guessed: it does not work in the right
>way, squid does only seem to use the last http_port specified, just forgets
>about our first one.
>
>I tried different things with that config file, but none of them did the
>trick.
>
>Maybe some of you got it working, if so please tell me how.
>
>regards,
>
>sebas.
>
>
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://lists.zope.org/mailman/listinfo/zope
>**   No cross posts or HTML encoding!  **
>(Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )