Hi,

I have a mod_perl backend listening on *:81 and a proxy in front of it
listening on *:80, both using mod_vhost_alias configured with

    VirtualDocumentRoot /www/site/%0

i.e. www.mydomain.com will have /www/site/www.mydomain.com as it's document
root. The frontend has

<IfModule !mod_perl.c>
    RewriteEngine On
...
    RewriteRule \.(jpg|png|swf|css|html|txt|cgi)$ - [last]
    RewriteRule ^/(.*)$ http://%{HTTP_HOST}:81/$1 [proxy]
</IfModule>

Now this all works fine except when a client side redirect using meta
http-equiv tags occurs, in which case the hostname part in the url holds a
:81 suffix, effectively bypassing the proxy. Now, the problem is I cannot
use ProxyPassReverse because it doesn't eat hostnames as its first argument.

What's the advisable thing here? Should I consider hacking around in
src/main/util_uri.c? Can this be fixed by a fixup handler (maybe replacing
r->uri_components->port?) Or should I just drop mod_vhost_alias on the
backend and start using perl sections to do a directory scan on /www/site
and setup all my VirtualHosts that way? Has anybody done this before?

Ime

Reply via email to