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 = www.domain.com IP1 = www.domain.com/forum

After move:

IP1 = www.domain.com IP2 = www.domain.com/forum

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

2 Answers 2


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, forum.domain.com, 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.


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

  • 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, 2011 at 10:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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