Squid 3.1.12 to connect to multiple domains.
I am using squid 3.1.12 as a proxy cache. All the requests initially land on a Apache server which acts as a reverse proxy server, the Apache redirects some URLs based on the context to Squid server.
This Squid server based on the URL needs to forward the request to the specific tomcat server where the application is deployed. I am able to configure just for one application but how do I configure multiple tomcat servers(each tomcat having different application deployed on it). Squid needs to redirect based on the URL.
In Squid.conf I made the following changes
http_port 3128 defaultsite=webfe.dev2.xxx.com
cache_peer abc.dev2.xxx.com parent 8080 0 no-query originserver
refresh_pattern -i /ABC 1440 20% 1440 override-expire override-lastmod reload-into-ims ignore-reload
#cache_peer def.dev2.xxx.com parent 8080 0 no-query originserver
#refresh_pattern -i /DEF 1440 20% 1440 override-expire override-lastmod reload-into-ims ignore-reload
Here Squid is deployed on my host webfe.dev2.xxx.com, Apache redirects any URLS with the context 'ABC' or 'DEF' to squid. Squid needs to redirect it to the individual hosts thats abc.dev2.xxx.com or def.dev2.xxx.com based on the URL.
I have commented the entry for DEF in my squid.conf as it was not working. But it does work for any URLs with ABC as the context. Any hints or help would be highly appreciated.
Did anyone try something similar with Squid as a reverse proxy to connect to multiple domains based on the URLs ?
I was able to solve it using urlpath_regex.
|All times are GMT -5. The time now is 12:18 PM.|