[ale] Apache reverse proxy question

Andrew Grieser agrieser at gmail.com
Sat Oct 17 21:41:34 EDT 2009


It's fixed now, but I'm still not sure what exactly was wrong. There was certainly some bizarre behavior from apache.

Here's what would happen when testing from outside the local network: I type in the address of the site, and a get a blank apache directory listing. It doesn't list any folders, even though it should. If I manually type in one of the folder names, I get an error page, and the domain in the url bar is a local one (not accessible from outside the network). If I type in the address of the site again, everything works fine. It continues to work fine until you close the browser and clear the cache. 

The bizarre thing is that if I used a 'simple' browser such as links, the site would never work, so somehow Firefox was able to figure it out on the second try.

The lesson I learned is that if you are using apache on computer 1 to reverse-proxy to apache on computer 2, the root page on computer 2 can't be a directory listing. Perhaps this is intended, maybe it is a bug, or maybe it requires additional configuration.

I found that reverse proxying an entire subdomain is very simple, the configuration on computer 1 looks like:

 <VirtualHost *:80>
    ProxyPreserveHost On
    ProxyPass / http://192.168.111.2/
    ProxyPassReverse / http://192.168.111.2/
    ServerName hostname.example.com
</VirtualHost> 


On Fri, Oct 16, 2009 at 07:20:22PM -0400, Brian Pitts wrote:
> So everything is working except mod_proxy_html isn't rewriting all of
> the links? Are the links from static html or are they generated somehow?

I ended up not needing mod_proxy_html at all, since the entire subdomain is proxied.

Andrew


More information about the Ale mailing list