LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 05-18-2011, 01:04 PM   #1
prashantbs
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 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 ?

Thanks.

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

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


Reply


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


All times are GMT -5. The time now is 02:15 AM.

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