LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Apache: redirect different domains to different internal servers (https://www.linuxquestions.org/questions/linux-server-73/apache-redirect-different-domains-to-different-internal-servers-803810/)

eco 04-23-2010 02:03 PM

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?

example:

Code:

domain1.com -+          +--|Apache server hosting domain1 and domain2|
domain2.com -+--| fw |--+
domain3.com -+          +--|Apache server hosting domain3|

Thanks for any help!

bathory 04-23-2010 02:56 PM

Hi,

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.

Regards

eco 04-23-2010 03:03 PM

Thanks bathory, just what I was looking for it seems!


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