Virtual Hosts Issue

Discussion in 'Apache' started by sakkara, Oct 14, 2007.

  1. #1
    Hi,
    I have two servers on my network. One that has an external IP address, and one that does not. Is it possible to use an apache virtual host to redirect requests to the server that does not have an IP address, so that the first server acts as a gateway?

    I am using the command:-
    RedirectPermenant / 10.1.0.100:81

    This is not working simply because that is not an external IP. Any ideas?

    Thank you!
     
    sakkara, Oct 14, 2007 IP
  2. Ladadadada

    Ladadadada Peon

    Messages:
    382
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The directives you want are BalanceMember, ProxyPass and ProxyPassReverse. Although I think you can do away with the BalanceMember stuff if you only have one other host.

    This will tell Apache on the external facing machine to request any pages it is supposed to serve from the internal machine and serve them up itself.

    If you install mod_cache on the front end machine you can also avoid requests to the back end server for static images, css and js files.

    Docs: http://httpd.apache.org/docs/1.3/mod/mod_proxy.html#proxypass

    And a good tutorial: http://www.linuxfocus.org/English/March2000/article147.html
     
    Ladadadada, Oct 14, 2007 IP