Hello,
We are using Squid as a caching proxy for different web servers, and we
use redirecting rules to cache some internal services through our Squid
server.
For example, we have the following service:
http://squidhost/service/
in which squidhost is the host Squid is running and is our public
interface to internal services. And service is some apache -server at our
internal network. We use Squid to redirect any requests to
squidhost/service to the internal server that handles them and returns
them throught the squidhost to the user. These internal apache -servers
are hosted on the same machine, but on different ports.
The problem is, when for some reason URL like this is passed to the
external service with the terminating slash missing:
http://squidhost/service/somedirectory
the Squid server rewrites it as such:
http://squidhost:7011/somedirectory
and we cannot access this port 7011 because it is an internal server which
is protected with a firewall.
But when you add the terminating slash, it redirects it correctly. We are
using the perl redirect writing, and have the following lines in it:
print($_), next
if s/(squidhost(:80|:443)?\/service/IPADDRESS:PORT/o;
Where IPADDRESS is the address of our internal server and port is the port
that this service is being served from.
But if the url or directory does not exist at all, a normal error report
is being returned. So if only the directory actually exists and the
terminating / is omitted, the redirecting goes wrong. Where could the
problem be? The redirecting rules in our redirect.pl? Some configuration
option of Squid ? Help would be really appreciated, because I have tried
to look everywhere and have found nothing. I have tried debugging the
redirect.pl file but it doesn't help, the invalid request shows there but
it is still rewritte
-- Sakari Lehtonen sakari at ionstream piste fi +358 40 777 1528 -- Sakari Lehtonen +358407771528 sakari at ionstream dot fi -- Sakari Lehtonen +358407771528 sakari at ionstream dot fiReceived on Tue Mar 21 2006 - 05:10:21 MST
This archive was generated by hypermail pre-2.1.9 : Sat Apr 01 2006 - 12:00:04 MST