[ale] Apache reverse proxy question

Andrew Grieser agrieser at gmail.com
Fri Oct 16 07:36:13 EDT 2009


I guess this is sort of off topic (apache), but I figure lots of people on this list deal with apache daily.

I only have one IP address coming into the network, so I'm using NAT on the firewall to forward port 80 to the webserver (computer 1). However, I need to have one subdomain handled by another computer (computer 2).

My solution was to try to reverse proxy the entire subdomain from computer 1 to computer 2, but all the examples I can find seem to deal with reverse proxying only specific location (ex: /app1/).

Currently, it sort of works, but I think I am having trouble mapping the address of computer 2 back to computer 1. It works locally, but occasionally I get an internal subdomain in the url bar.

My questions are: 
    Is it feasible to reverse proxy an entire subdomain?
    How do I get correct URL mapping between computers?


OS: Debian Lenny
Apache virtual host file from computer 1:

<VirtualHost *:80>
    ServerName subdom.example.com
    DocumentRoot /var/www/subdom

    <Directory />
        Options MultiViews
        ErrorDocument 404 /index.php
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>

    ProxyRequests off

    ProxyPass        / http://subdom.internal.example.com/
    ProxyHTMLURLMap  http://subdom.internal.example.com/ /
    ProxyPassReverse / http://subdom.internal.example.com/

    #other config (logs, etc)
    ...

</VirtualHost>


More information about the Ale mailing list