Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

Today:

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 ?

share|improve this question

2 Answers 2

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, 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.

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

  <proxy>
    Order deny,allow
    Allow from all
  </proxy>

</VirtualHost>

img:

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

 
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.