Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My apache-knowledge is minimal.

What I have:

One apache on 10.10.10.5
One apache on 172.16.10.9

Both use same pfSense-gateway and share same external IP. I would like point two different domains to this external IP. On domain1.com, the 10.* server should answer and och the domain2.com, the 172.* server should answer.

Can this be done?

share|improve this question
    
A couple linked questions involved, but I asked questions about a similar situation. serverfault.com/a/415895/123250 –  JoshP Oct 14 '12 at 20:47
add comment

1 Answer

up vote 1 down vote accepted

You need a front end web-server acting as a reverse proxy that forwards requests based on the HTTP Host header. The front end could be a separate server or one of the existing servers.

The Apache HTTPD server has a mod_proxy module that can be used for this.

A reverse proxy (or gateway), by contrast, appears to the client just like an ordinary web server. No special configuration on the client is necessary. The client makes ordinary requests for content in the name-space of the reverse proxy. The reverse proxy then decides where to send those requests, and returns the content as if it was itself the origin.

Google coughs up some random example

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.