I'm setting up 2 ubuntu servers in different locations, one blog, one forum. I was going to use a subdomain for the forum but decided instead to make it a subfolder, example.com/forum.

Is there a way to get Apache on server 1 to redirect requests to example.com/forum to server 2. Whilst keeping the users url example.com/forum and not forum.example.com. Do I need mod-rewrite rules or a reverse proxy?

Would prefer traffic to both parts of the website to be shared between the servers reducing the load on server 1


You would need a reverse proxy. Assuming you don't want to install extra software (which has tangential potential benefits) you'll want something like mod_proxy. This will increase the load on server1 a relatively small amount (per connection proxied).

  • Thanks Chris, what extra software could I use? And by increased load I assume network traffic, So i'd be adding the latency between server 1 and 2 to any visit to /forum? – Carl Mar 19 '13 at 20:36
  • There's variety of OSS reverse proxies available (eg Varnish, HAProxy, nginx). Each has distinct features and advantages (which may or may not be useful), but add complexity. Correct, network load and some minor processing and memory load to the Apache process. – Chris S Mar 19 '13 at 21:09
  • I may keep the subdomain then, only reason for looking at a folder was seo benefits on keeping them together. Thanks – Carl Mar 19 '13 at 22:11

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.