Link to home
Start Free TrialLog in
Avatar of Richard2048
Richard2048

asked on

Need config for one squid reverse proxy serving up multiple sites with different internal IP's all from the single external IP used by Squid

I followed this example: http://wiki.squid-cache.org/ConfigExamples/Reverse/MultipleWebservers

but can't it to work for my setup - which is a bit different but not that much.  This is using a default config from Squid 2.6 on CentOS 5.4, nothing extra added or changed except for what is mentioned in the article.  I get 'service is not available'...

My setup is:
test1.example.com hosted on IP1
test2.example.com hosted on IP1
test3.example.com hosted on IP2
test4.example.com hosted on IP2
test5.example.com hosted on IP3
test6.example.com hosted on IP3
test7.example.com hosted on IP4
test8.example.com hosted on IP5
...
testX.example.com hosted on IPX

I use Citrix Xen but I don't that's relevant as they are all separate virtual servers with separate internal IP's accessed via the Squid reverse proxy which has one external IP.  The reason I am doing this is not really for web acceleration but because we don't have enough external IP's to map to each virtual server we need.  A single virtual server may host more than one site, using Apache and VHOSTS.  Some virtual servers may only host a single site, regardless all virtual servers will have separate internal IP addresses, naturally.

Any assistance is greatly appreciated!
Thanks
Richard
ASKER CERTIFIED SOLUTION
Avatar of cjl7
cjl7
Flag of Sweden image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Richard2048
Richard2048

ASKER

Yup - thanks - works for me now....

This is my conf now:

http_port 80 accel defaultsite=error.example.local vhost
cache_peer 192.168.0.35 parent 80 0 no-query originserver name=myAccel

acl all src 0.0.0.0/0.0.0.0
http_access allow all
cache_peer_access myAccel allow all

It'll need tightened up for security but now at least works.

Thanks
Richard