Apache to redirect to different internal servers

Hello to everyone,

I am new to apache configuration. I am thinking of implementing the following but not sure how:

I would like to have one server that will be accessible from the internet for example IP1.
I would like to have different server that host different web sites for example IP2, IP3. I know I could use virtual servers with Apache, but the problem is that for example for magento there are problems with LAMPP so I am thinking of running ZendServer in IP3.

The canonical name for the web site is as following:
IP2 name2.com
IP3 name3.com

In IP1 and IP3 I will run LAMPP but in IP1 only apache.

I want to have the following:
when someone hits the name2.com address the request will come to the IP1 and then apache should forward the request to IP2 (I want apache to translate the url from name2.com/… to IP2/…). The same I would like to have for the IP3.

Do you know how I can do that with apache LAMPP? I have tried using Redirect but this is actually redirect the url to IP2/… but IP2 is not accessible from the internet so doesn’t work.
I also tried Alias but it didn’t work too. I think alias is only for directories, like symlink, so is not translating the url as I want.

Would I have what I want by using Apache proxy? But for this one I will also DNS ? I am reading books but they are all messed up in my head!


This is called proxying. You might consider something faster than Apache for that job, like nginx or haproxy.

Is there something with a GUI for mac is or Linux?

You write a couple lines of text to configure services like these. You really don’t need or want a GUI.


IMHO, what you’re asking for is … silly. Each domain has a pointer at the registrar which points to a host server for that domain. That host server’s DNS points to the correct directory on its file system THEN Apache gets involved. “Shortstop” your process by using either the registrar or DNS to point where you want each domain’s request to go.