Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 05-18-2011, 01:04 PM   #1
LQ Newbie
Registered: May 2011
Location: California, USA
Posts: 4

Rep: Reputation: 0
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

cache_peer parent 8080 0 no-query originserver

refresh_pattern -i /ABC 1440 20% 1440 override-expire override-lastmod reload-into-ims ignore-reload

#cache_peer 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, Apache redirects any URLS with the context 'ABC' or 'DEF' to squid. Squid needs to redirect it to the individual hosts thats or 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 ?


Last edited by prashantbs; 05-23-2011 at 01:09 PM.
Old 05-23-2011, 09:12 PM   #2
LQ Newbie
Registered: May 2011
Location: California, USA
Posts: 4

Original Poster
Rep: Reputation: 0
I was able to solve it using urlpath_regex.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Squid reverse proxy + SSL or hosting multiple domains from one IP friskydrifter Linux - Networking 8 11-19-2009 12:00 AM
Multiple emails accounts(with different from domains) on multiple domains on 1 server locoputo Linux - Server 0 04-12-2009 06:29 PM
Multiple domains in LDAP and 1 samba server for all domains, what to do? xnomad Linux - Server 1 11-14-2008 09:12 AM
Sub Domains & Multiple Domains (Apache) lugos Linux - Server 1 09-01-2006 10:22 PM
Bind configuration for multiple sub-domains on multiple sites JF1980 Linux - Networking 3 08-31-2006 01:28 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:28 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration