Apache reverse proxy with mod_proxy and 302 redirection

Discussion in 'Server Operation' started by Cloud, Feb 29, 2008.

  1. Cloud

    Cloud New Member

    Hi all,

    I'm setting up a reverse proxy using apache and mod_proxy to redirect from one server to another (from A to B for example)
    But in server B it has a redirect method that redirect with 302 code to another server (C)
    The result is when I go to site A, the reverse proxy give me to access B, but the 302 redirection lead me to C, and showing C on the address bar
    Do you have an idea to make reverse proxy work with this kind of redirection?

    I tried with mod_rewrite to change my URL, but it seems to not working

    Any idea/suggest would be really appreciated
  2. topdog

    topdog Active Member HowtoForge Supporter

    Why do you need to chain 3 servers, can you not do it in a more efficient way ?
  3. Cloud

    Cloud New Member

    In my case, I have to do it with the 3 servers, and not to remove anything
  4. topdog

    topdog Active Member HowtoForge Supporter

    Instead of redirecting why dont you proxy from the second server as well.
  5. Cloud

    Cloud New Member

    In this case, it's a little bit complex

    Server B is behind the firewall and just allow access from server A, all it can do is redirect to C after checking for policy, etc.... that's why I ask for a reverse proxy with 302 redirection

    I still want to do it, not another solution

    Do you have any idea to implement this kind of reverse proxy?
  6. topdog

    topdog Active Member HowtoForge Supporter

    But the question is if the content is on server C why cann't server B just request it from server C and send it to server A

    Internet <---> ServerA <-----> ServerB <------> ServerC
  7. Cloud

    Cloud New Member

    I can't make any changes on server B, that's the biggest problem :(
    All I can do is on server A with the reverse proxy

Share This Page