Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We today have a site thats hosted on a single machine. Since the traffic is increasing to our forum we would like to move that forum to a new machine, but keep the url structure mostly to keep our google mojo.


IP1 = IP1 =

After move:

IP1 = IP2 =

Can this be done with apache ? or do we need some sort of proxy in front ?

share|improve this question
up vote 1 down vote accepted

This can be done by apache and mod_rewrite, however traffic would still hit the first server before being proxied off to the second one.

A better solution would be to setup a subdomain,, and host that on the second IP address. Then setup a 301 permanent redirect on the first server for the /forum address. Google will understand this as a change of address for the same site, and you won't loose anything by making this change. The redirect will take care of all your customers who have the old URL bookmarked.

share|improve this answer
You are absolutly sure of this google subdomain thing ? – user72014 Feb 24 '11 at 10:36

Use mod_proxy on IP1:

<VirtualHost *:80>


  ProxyPass /forum http://IP2/forum
  ProxyPassReverse /forum http://IP2/forum
  ProxyPreserveHost On

    Order deny,allow
    Allow from all



enter image description here

share|improve this answer
This will work, but traffic will stil hit the server at IP1 before being proxied to the server at IP2. This is fine if network bandwidth is a non-issue and you are just trying to reduce CPU load in IP1, but it's not the most effective split possible. – Caleb Feb 24 '11 at 10:42

Your Answer


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.