I've got the classic lightweight front end proxying to the mod_perl
heavyweight backend.  I use proxy_add_forward on the front end and the
PerlPostReadRequest handler to set $r->hostname and $r->remote_ip.

This all works excellently.  My question, however, is this too late
for the name-based virtual hosts to trigger?  In my mod_perl app, I
need to trigger different things based on the virtual site.  What I
want to do is this:

<VirtualHost localhost>
 ServerName www.mailermailer.com
 PerlSetVar SiteID 7
 PerlSetVar SiteName www.mailermailer.com
</VirtualHost>

<VirtualHost localhost>
 ServerName m1e.net
 PerlSetVar SiteID 1
 PerlSetVar SiteName m1e.net
</VirtualHost>

in the backend.

However, it seems that it always picks up the first virtual host
defined this way, regardless of what the post read request handler
sets $r->hostname to.

Is there some other trick I should try?  I'm working from home today
and don't have my Eagle book handy...

If I can't get it to work with name virtual hosts, I'll have to go to
port-based virtual hosts, which I'd prefer to avoid since I expect to
have several hundred of these eventually.

Thanks.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.                Khera Communications, Inc.
Internet: [EMAIL PROTECTED]       Rockville, MD       +1-240-453-8497
AIM: vivekkhera Y!: vivek_khera   http://www.khera.org/~vivek/

Reply via email to