LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 08-18-2006, 04:23 AM   #1
spanishwasabi
LQ Newbie
 
Registered: Mar 2006
Location: Spain
Distribution: Ubuntu
Posts: 25

Rep: Reputation: 15
Apache redirections


Hi,

My internal network is behind a NAT. I have a main machine (call it A) that I use as an Apache server on port 80 for several sites (say mysite1.com, mysite2.com). Because of the NAT, any request on port 80 will have to go to a single machine no matter the site requested.

I intend to distribute the charge and have one machine for each site (call it B and C). I'm using virtual machines, so it should not be a problem to find them :-)

I would like a way of redirecting the requests depending of the site. For example, if A receives a request for mysite1.com it will send it to machine B, and if A receives a request for mysite2.com it will send it to machine C. I hope I've not been too confusing...

Thanks a lot,

G
 
Old 08-18-2006, 06:41 AM   #2
penguintutor
Member
 
Registered: Jun 2006
Location: UK
Distribution: Ubuntu, Mandriva, Redhat and Fedora
Posts: 118

Rep: Reputation: 15
You can do this by configuring machine a as a reverse proxy to forward the requests on to the other servers.

Within each virtual host definition on machine a, you would add an entry
Code:
ProxyPass http://<server to redirect to>
This would then pass all requests for that virtual host to the new server.
 
Old 08-18-2006, 12:04 PM   #3
spanishwasabi
LQ Newbie
 
Registered: Mar 2006
Location: Spain
Distribution: Ubuntu
Posts: 25

Original Poster
Rep: Reputation: 15
Thanks, makes sense.

So if i understand you, machine A would only redirect the traffic with the Apache application.

Could it be used for a domain and subdomains? I would like to redirect *.mysite1.com to machine B with a single rule, not just www.mysite1.com (same for mysite2.com), as I have www.mysite1.com, photos.mysite1.com, blog.mysite1.com,...

And is it possible to do it with a more lightweight server than Apache? Seems a bit overkill for the task.

Thanks a lot!

G
 
  


Reply

Tags
apache, nat, redirection


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
dns server and redirections prasadlinuxguy Linux - Networking 1 06-08-2006 12:51 AM
Mail from Apache being rejected - Cannot route to sender apache@localhost.localdomain jimwillsher Linux - Networking 2 01-19-2006 01:41 AM
redirections between directories/files basher400 Linux - Newbie 9 06-21-2005 09:44 AM
Apache Webserver 403 Forbidden Errors (User not in apache group?) Mankind75 Mandriva 4 07-08-2004 06:30 AM
apache benchmarks (apache v13 / apache v20) ; large differences between benchmarking markus1982 Linux - Software 0 02-08-2003 11:53 AM


All times are GMT -5. The time now is 01:10 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