[squid-users] Problems with squid redirectors

From: richard skeggs <richard@dont-contact.us>
Date: Tue, 1 Jun 2004 13:59:03 +0100 (BST)

With the squid.conf file shown below I get the result I expect and want ie
the redirect to http://eghsnap1:8000. However I need to set up a number of
redirections

http://eghapp:80/eghsnap1 -> http://eghsnap1:8080
http://eghapp:80/eghsnap2 -> http://eghsnap2:8080
http://eghapp:80/weblogic -> http://eghsnap1:7001
http://eghapp:80/websphere -> http://eghsnap2:9080

For this I tried to set up a redirectors for which I added the following
lines to the squid.conf file.

# set up the redirector
httpd_accel_host virtual
httpd_accel_port 0

redirect_program /usr/share/squid/bin/redirector.pl
redirect_children 5
redirect_rewrites_host_header on
redirector_access allow all
redirector_bypass on

However my script redirector.pl is not being called. When I run the perl
redirector script on the command line I again get the results I expect but
not when run through squid.

Any assistance would be greatly appreciated.

The squid.conf file I am trying to use.

# The port for squid to listen on
http_port 3128

# lets try to deny cgi access to the server
hierarchy_stoplist cgi-bin ?

acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY

auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours

# the all important reverse proxy settings
httpd_accel_host eghsnap1
httpd_accel_port 8000
httpd_accel_single_host off
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

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
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 8000

# Only allow cachemgr access from localhost
http_access allow manager localhost
#http_access deny manager

# Deny requests to unknown ports
http_access deny !Safe_ports
# Deny CONNECT to other than SSL ports
acl CONNECT method CONNECT
# And finally deny all other access to this proxy
http_access deny CONNECT !SSL_ports

http_reply_access allow all
icp_access allow all

# dont allow cacheing
no_cache deny all

visible_hostname http://eghapp

cachemgr_passwd secret shutdown
cachemgr_passwd lessecret info stats/objects

error_directory /usr/share/squid/errors/English
coredump_dir /var/spool/squid
Received on Tue Jun 01 2004 - 06:59:09 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Jul 01 2004 - 12:00:02 MDT