Re: [squid-users] Problems with getting squid and Zope on Debian testing (Resend for missing first line)

From: Chris Robertson <crobertson@dont-contact.us>
Date: Tue, 24 Oct 2006 15:28:51 -0800

Dirk Gomez wrote:
> (This is a resend - the first line was missing in my first post.)
>
> I'm trying to migrate a few Zope-based sites from an install on old
> Suse boxes to my shiny new Debian testing installation (which provides
> all the necessary package right out of the box and will soon be
> released - tm). The sites use squid for both caching and virtual
> hosting and that's where I am stuck right now. The problem basically
> is that redirects don't work properly: a request must be changed from
> http://www.foobarclub.de/ to
> http://machine2.foobar.de:9080/sites/foobarclub.de/myzms/ and is
> changed instead to http://machine2.foobar.de:9080/ .
>
> On the old machines squid 2.5 is being used. Debian testing comes with
> a slightly more recent version, squid 2.6. Initially I started using
> jesred as the redirector, because squirm (used on the old boxes isn't
> packaged for Debian. Suspecting it to be the cause for my problem,
> I've compiled squirm and the problem persisted and I switched back to
> jesred. That let's me think something in squid configuration has
> changed from 2.5 to 2.6.
>
> Here's Debian testing's squid:
>
> debian31m:~# squid -v
> Squid Cache: Version 2.6.STABLE1
> configure options: '--prefix=/usr' '--exec_prefix=/usr'
> '--bindir=/usr/sbin' '--sbindir=/usr/sbin'
> '--libexecdir=/usr/lib/squid' '--sysconfdir=/etc/squid'
> '--localstatedir=/var/spool/squid' '--datadir=/usr/share/squid'
> '--enable-async-io' '--with-pthreads'
> '--enable-storeio=ufs,aufs,diskd,null' '--enable-linux-netfilter'
> '--enable-linux-proxy' '--enable-arp-acl' '--enable-epoll'
> '--enable-removal-policies=lru,heap' '--enable-snmp'
> '--enable-delay-pools' '--enable-htcp' '--enable-cache-digests'
> '--enable-underscores' '--enable-referer-log' '--enable-useragent-log'
> '--enable-auth=basic,digest,ntlm' '--enable-carp' '--with-large-files'
> 'i386-debian-linux' 'build_alias=i386-debian-linux'
> 'host_alias=i386-debian-linux' 'target_alias=i386-debian-linux'
>
> Here's the squid.conf:
> cache_peer localhost parent 9080 0 no-query originserver
> http_port 192.168.2.100:80 transparent
> hierarchy_stoplist cgi-bin ?
> acl QUERY urlpath_regex cgi-bin \?
> no_cache deny QUERY
> acl zope_manage urlpath_regex /manage \?
> no_cache deny zope_manage
> maximum_object_size 8192 KB
> emulate_httpd_log on
> log_ip_on_direct off
> log_mime_hdrs off
> debug_options ALL,1
> hosts_file /etc/hosts
> redirect_program /usr/lib/squid/jesred
> redirect_children 10
> redirect_rewrites_host_header off
> refresh_pattern ^ftp: 1440 20% 10080
> refresh_pattern ^gopher: 1440 0% 1440
> refresh_pattern . 0 20% 4320
> acl all src 0.0.0.0/0.0.0.0
> acl manager proto cache_object
> acl localhost src 127.0.0.1/255.255.255.255
> acl ext-ip-addr src 192.168.2.100/255.255.255.255
> acl virtual-domains dstdomain "/etc/squid/virtual-domains"
> acl denied_src src "/etc/squid/denied_src"
> acl purge method PURGE
> acl CONNECT method CONNECT
> acl QUERY urlpath_regex cgi-bin \?
> acl zope_manage urlpath_regex /manage \?
>
> http_access allow ext-ip-addr
> http_access allow virtual-domains
> http_access allow purge localhost
> http_access allow manager localhost
> http_access deny manager
> http_access allow purge localhost
> http_access deny purge
> #http_access deny !Safe_ports
> #http_access deny CONNECT !SSL_ports
> http_access allow localhost
> http_access deny all
> http_reply_access allow all
> icp_access allow all
> cachemgr_passwd z0rbic all
> coredump_dir /var/spool/squid
>
> I did try the changes to the squid.conf as described here:
> http://www.mail-archive.com/squid-users@squid-cache.org/msg39275.html
> - to no avail.
>
> /etc/squid/virtual-domains holds the list of hosted domains.
>
> And jesred.rules basically contains these redirection rules:
>
> regex
> ^(http://)(machine1|machine2|machine3|machine4|machine5)\.(foobar\.de)(:[0-9]+)?(/.*)$
> http://\2.\3:9080/VirtualHostBase/http/\2.\3:80/VirtualHostRoot\5
> regex ^(https?)://zope\.([^/:]+)(:[0-9]+)?(/.*)$
> http://127.0.0.1:9080/VirtualHostBase/\1/zope.\2:80/sites/\2/VirtualHostRoot/\4
>
> regex ^(https?://)(www\.)?([^./:]+\.[^./:]+)(:[0-9]+)?(/.*)$
> http://127.0.0.1:9080/VirtualHostBase/http/\2\3:80/sites/\3/myzms/content/VirtualHostRoot\5
>
>
> And /var/log/squid/jesred-rewrite.log is empty.

The Squid 2.6 Release Notes contain the following...

*redirect_**

    Renamed to url_rewrite_* to better reflect the functionality of this
    helper (rewriting requested URLs)

Chris
Received on Tue Oct 24 2006 - 17:29:10 MDT

This archive was generated by hypermail pre-2.1.9 : Wed Nov 01 2006 - 12:00:04 MST