Hello all- 
        I have an interesting situation and I am hoping someone can
point me in the right direction. 

Scenario : I am running two apache servers, stronghold up front for my
reverse proxy ( 80 / 443 ) and a modperl apache running on port 802. All
80/443 requests are reverse proxied to the modperl server running on Port
802.

This is all standard and works well. My problem is this :

The backend server is dynamically configured via perl sections ( for
vhosts ).Front end requests end up falling through to the default vhost since,
unless specifically configured, they must proxy to 'localhost' which does
not work ( wrong hostname ). My goal here is to have all non specifically
mapped requests fall through to the _default_ vhost and then proxied back
to port 802. I do NOT want to manually add vhosts specifically for
proxying to the static configuration file ( to much human intervention ).

I have tried this :

<VirtualHost _default_:80>
        ProxyPass / http://localhost:802/
        ProxyPassReverse / http://localhost:802/
</VirtualHost>

But the backend server gets the actual localhost name as its ServerName
and does not enter the VirtualHost hash properly, giving me the
DocumentRoot for the localhost domain name.

What I need to achieve is( and if I build a static vhost like this it
works ) :

<VirtualHost _default_:80>
        ProxyPass / http://ACTUAL_REQUEST_DOMAIN_NAME:802/
        ProxyPassReverse / http://ACTUAL_REQUEST_DOMAIN_NAME:802/
</VirtualHost>

Anyone know how to accomplish this? If I could access the ENV variables
in a static apache configuration it would work I imagine. I am thinking
some sort of mod_rewrite would work as well.

Sort of half modperl, half apache but I have searched and not found this 
answer yet and imagine that SOMEONE on the list must have dealt with this
sort of thing before.

Any tips are appreciated, this is a major itch in my side!

John-

Reply via email to