Elli Albek wrote:
Thanks Amos, I should have found that doc myself.
Can you please shed more light on this:
http_port 1234 accel vhost defaultsite=s1.blah.com:80
What purpose does it serve? Our origin server is tomcat, and it behaves very well for quite a while. Are you talking about terminating http 1.1 connections or something like that?
So its a fix for some 'smart' web apps naive coders which are known to
embed their port in absolute URLs when serving on a non-80 port.
That line makes Squid listen for requests coming back in to the back-end
port, and handles them as if they were coming in port 80 like they
should have.
Tomcat IIRC now ships with config that does similar things on outgoing
pages to fix them itself where it can. So you probably won't hit that
problem, but its worth knowing about.
Amos
E
----- Original Message -----
From: Amos Jeffries <squid3@xxxxxxxxxxxxx>
To: Elli Albek <elli@xxxxxxxxxxxxxxx>
Cc: squid-users@xxxxxxxxxxxxxxx
Sent: Fri, 19 Jun 2009 04:26:55 -0700 (PDT)
Subject: Re: Reverse proxy on two sub-domains
You need to kill whatever interception rules are sending stuff to port
3128 and setup a real virtual hosting reverse proxy.
http_port 80 accel vhost defaultsite=s1.blah.com:80
cache_peer 1.2.3.4 parent 1234 0 no-query originserver name=my_parent
acl url_s1_dir urlpath_regex ^/s1_dir/
acl url_s2_dir urlpath_regex ^/s2_dir/
acl s1_domain dstdomain s1.blah.com
acl s2_domain dstdomain s2.blah.com
http_access allow s1_domain url_s1_dir
http_access allow s2_domain url_s2_dir
http_access deny all
...Thats it, the entire lot.
see http://wiki.squid-cache.org/ConfigExamples/Reverse/VirtualHosting
If you get badly coded web-apps on the parent ending requests to port
1234 you may also need this:
http_port 1234 accel vhost defaultsite=s1.blah.com:80
Amos
--
Please be using
Current Stable Squid 2.7.STABLE6 or 3.0.STABLE16
Current Beta Squid 3.1.0.8