handing off requests using mod_proxy

Discussion in 'Apache' started by vanderkerkoff, Jul 31, 2007.

  1. #1
    Hello everyone

    I need to hand off any requests for domain www.bongobadness.com to a lighttpd server running on the same machine on port 8000.

    We've got alot of sites running on apache, it's just this one is a django site and I've only had experience of running djanog on lighttpd, so I'd rather stick with that.

    mod_proxy is enabled, but I'm not certain how to edit my httpd.conf file now. I'ts apache2 by the way.

    I found this. If you look carefully you'll notice that if I use this method, I'll be forwarding all requests for / off to another server. I only want to send www.bongobadness.com to port 8000.

    LoadModule proxy_module modules/mod_proxy.so
    LoadModule proxy_http_module modules/mod_proxy_http.so

    ProxyRequests Off
    <Proxy *>
    Order deny,allow
    Deny from all
    Allow from localhost
    </Proxy>

    ProxyPass / http://localhost:8000/
    ProxyPassReverse / http://localhost:8000/

    If you look carefully you'll notice that if I use this method, I'll be forwarding all requests for / off to another server. I only want to send www.bongobadness.com to port 8000.

    So maybe I need either a Location or VirtualHost directive and put the ProxyPass and ProxyPassReverse lines into that?

    Sound sensible?
     
    vanderkerkoff, Jul 31, 2007 IP