Apache reverse proxy redirect/forward http and ftp requests

Discussion in 'Apache' started by vilhs, Apr 5, 2011.

  1. #1
    Hello.

    So, I have a webserver which is my reverse proxy, and the I have another webserver which is the actual server where the web content is located, let's call it server A (reverse proxy) and server B (the other).

    I have this website on my dns (windows AD) : yadda.domain
    What I want is: if the user puts in the browser http://yadda.domain the user is redirected to the Server B, and thus sees the website
    If the user puts ftp://yadda.domain, the user is redirected to the same Server B, but through FTP protocol.

    My question is, how can I acomplish this in apache?

    I know I need mod_proxy but I don't understand how I can make the redirect in the <VirtualHost ServerA>
    ???
    ???
    ???
    </VirtualHost>

    I want something like (though I doubt it is possible):
    IF http THEN
    redirect to http://serverB-yadda.domain
    ELSE IF ftp THEN
    redirect to ftp://serverB-yadda.domain
    END IF;

    Thanks.

    Regards,
    Vilhena
     
    vilhs, Apr 5, 2011 IP
  2. saima.spider

    saima.spider Peon

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    is this feasible
     
    saima.spider, Apr 14, 2011 IP