Ahmed Akkad wrote:
solved, :D now running 100% like i want, it is about using the flag
"vhost" instead
of "defaultsite", so for reference, here is the last configuration i
did where i just added
FWIW:
vhost - makes squid use the Host: header to determin domain wanted.
Normal virtual-hosting behavior.
defaultsite=XX - makes squid assume that Host: header says XX when it
is not set at all. Useful for those legacy tools and browsers which
still don't use Host: header properly.
You may find it useful to use both, but definitely you want 'accel
vhost' as a minimum option set for this.
the following lines at the top of the file squid.config, all other
configurations i left them
as they are with no modification:
http_port 8000 accel vhost
cache_peer 127.0.0.1 parent 80 0 no-query originserver name=srvtomcat
cache_peer_domain srvtomcat akkad.sytes.net
cache_peer 10.1.1.101 parent 80 0 no-query originserver name=srviis
cache_peer_domain srviis awali.sytes.net
http_access allow all
As said "allow all" is a bad idea in general.
For the accelerator case direct access is default blocked, so not as
unsafe as it seems. But its a good idea to explicitly configure whats
wanted anyway just in case.
The default config examples show a dstdomain ACL containing the domain
names which are to be permitted by cache_peer_access, http_access, and
any other access its which need to exempt the accelerated site(s).
You will need one such ACL for each unique peer domain set.
Amos
--
akkad
On Mon, May 4, 2009 at 12:36 PM, Jeff Pang <pangj@xxxxxxxx> wrote:
Ahmed Akkad:
ok, now i have something running, but still i have a problem, please take
a look
at the following configuration:
http_port 8000 accel defaultsite=localhost
cache_peer 127.0.0.1 parent 80 0 no-query originserver name=srvTomcat
cache_peer_domain srvTomcat subA.domain.com
cache_peer 10.1.1.100 parent 80 0 no-query originserver name=srvIIS
cache_peer_domain srviis subB.domain.com
The name should be svrIIS instead of srviis, is it?
when i request either subA.domain.com or subB.domain.com both call the
same
tomcat web server that which is located on the same machine of Squid
server,
subB.domain.com it suppose to request the IIS server on machine with
IP 10.1.1.100,
whats wrong with my config?
--
Jeff Pang
DingTong Technology
www.dtonenetworks.com
--
Please be using
Current Stable Squid 2.7.STABLE6 or 3.0.STABLE14
Current Beta Squid 3.1.0.7