Serving from multiple servers mod_rewrite, mod_proxy or mod_alias?

Discussion in 'Server Operation' started by seaders, Aug 17, 2009.

  1. seaders

    seaders New Member

    Hi guys, I'm the admin of a few networked computers and would like to set up a nice clean setup for my system.

    So, I've a domain name, which gets pointed to server1. Then I've got a few users and their files on server2. I've then got a few other applications and things on server3.

    Now, what's currently happening is when anyone goes to, they get the default configuration in apache, on server1. If they go to, they get mod_rewritten to and the same setup if anyone goes to Now, this currently works perfectly, but I would much prefer the setup of the machines to be a lot nicer, ie the hierarchy stays hidden and when you go to, the files from server2 get served to you, but the url in your browser stays at, instead of going to

    I can't seem to find a way to do this with mod_rewrite, or mod_alias, so I think mod_proxy is the way to go, but I'm not 100% sure. The way I understand mod_proxy works would mean that a lot of the load of serving the files and applications on server2 & 3 would be taken on by server 1, which I don't want. Am I correct in this assumption, or would mod_proxy work for what I want?

    All help and info is hugely appreciated.
  2. seaders

    seaders New Member

    ok, I've used rewriterule to do this, with the [P] flag and it seems to be working really nicely, but there's a problem where every now and again, server2's address comes up in the browser's URL bar. it'll change the URL the first time, but not the second. anyone any idea why?
  3. seaders

    seaders New Member

    never mind again, there's an option for apache that is "ProxyPreserveHost On" which ensures that the URL you put into the browser stays there. all good now.

Share This Page