Register a domain and help support LQ
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 04-23-2010, 02:03 PM   #1
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Rep: Reputation: 48
Apache: redirect different domains to different internal servers

Hi all,

I have several web servers running apache on my LAN. Each internal server hosts a number of domains.

I would like to make these available to the internet and make sure they all get to use port 80 and 443.

My idea was to put Apache on the firewall and have all http(s) traffic from the Internet to my firewall be redirected by Apache to the different internal apache servers. This, in theory, would allow me to keep the standard http(s) port.

Can this be done? I was thinking of mod_rewrite and mod_redirect but in all honesty, I'm a little at a loss on where to start.

Can someone point me to relevant documentation or give me the basic idea on how to start?


Code: -+          +--|Apache server hosting domain1 and domain2| -+--| fw |--+ -+          +--|Apache server hosting domain3|
Thanks for any help!
Old 04-23-2010, 02:56 PM   #2
LQ Guru
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,476

Rep: Reputation: 1480Reputation: 1480Reputation: 1480Reputation: 1480Reputation: 1480Reputation: 1480Reputation: 1480Reputation: 1480Reputation: 1480Reputation: 1480

You can use mod_proxy and setup the apache facing internet as a reverse proxy for the internal servers.
You can find a lot of documentation about configuring apache as a reverse proxy.

1 members found this post helpful.
Old 04-23-2010, 03:03 PM   #3
Registered: May 2006
Location: BE
Distribution: Debian/Gentoo
Posts: 412

Original Poster
Rep: Reputation: 48
Thanks bathory, just what I was looking for it seems!


apache, modproxy

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
National domains redirect axelgenus Linux - Server 1 04-13-2009 06:55 PM
Redirect all traffic to IP nn to internal IP xx Red Squirrel Linux - Networking 1 03-17-2009 05:20 PM
Sub Domains & Multiple Domains (Apache) lugos Linux - Server 1 09-01-2006 10:22 PM
Apache2 internal redirect? WopMaster8 Linux - Software 2 03-28-2005 01:25 AM
Redirect traffic to internal IP? xmutex Linux - Networking 1 08-13-2001 10:29 AM

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