Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 44902 invoked from network); 14 Aug 2006 15:59:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Aug 2006 15:59:06 -0000 Received: (qmail 36035 invoked by uid 500); 14 Aug 2006 15:59:00 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 35904 invoked by uid 500); 14 Aug 2006 15:58:59 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 35893 invoked by uid 99); 14 Aug 2006 15:58:59 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Aug 2006 08:58:59 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of clint@traveljury.com designates 81.171.250.180 as permitted sender) Received: from [81.171.250.180] (HELO rambaldi.traveljury.com) (81.171.250.180) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Aug 2006 08:58:58 -0700 Received: from localhost (localhost [127.0.0.1]) by rambaldi.traveljury.com (Postfix) with ESMTP id 6F9A82431A; Mon, 14 Aug 2006 16:58:37 +0100 (BST) Received: from rambaldi.traveljury.com ([127.0.0.1]) by localhost (rambaldi.traveljury.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 21635-03; Mon, 14 Aug 2006 16:58:34 +0100 (BST) Received: from [192.168.5.6] (unknown [84.76.33.101]) (using SSLv3 with cipher RC4-MD5 (128/128 bits)) (Client did not present a certificate) by rambaldi.traveljury.com (Postfix) with ESMTP id 63F6E24319; Mon, 14 Aug 2006 16:58:33 +0100 (BST) Subject: Re: Dynamic Proxy Setup, resend, no styles From: Clinton Gormley To: Tom Weber Cc: modperl@perl.apache.org In-Reply-To: <7.0.1.0.2.20060814114352.02364818@nytimes.com> References: <7.0.1.0.2.20060814114352.02364818@nytimes.com> Content-Type: text/plain Date: Mon, 14 Aug 2006 17:58:30 +0200 Message-Id: <1155571111.5426.39.camel@obelix.traveljury.com> Mime-Version: 1.0 X-Mailer: Evolution 2.6.0 Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at traveljury.com X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Mon, 2006-08-14 at 11:44 -0400, Tom Weber wrote: > Hi, > > I would like to set up dynamic proxy server names in httpd.conf in an > Apache/2.2.2 (Unix) mod_apreq2-20051231/2.5.7 mod_perl/2.0.2 > Perl/v5.8.8 on Red Hat 2.6.9-34.0.2.ELsmp #1 SMP environment. Hi Tom having just spent all day looking at dynamic configuration, I know exactly where to look. http://perl.apache.org/docs/2.0/api/Apache2/PerlSections.html and http://perl.apache.org/docs/2.0/api/Apache2/ServerUtil.html#C_add_config_ You could do this as follows: (untested) my $hostname = `hostname`; my %map = ( F1 => 'M1', F2 => 'M2' ); push @ProxyPass,"/users/","http://$map{$hostname}/users"; or, in a startup file: $s = Apache2::ServerUtil->server; $server->add_config("ProxyPass /users/ http://$map{$hostname}/users"); > clint ________________________________________________________________________ Clinton Gormley clinton@traveljury.com www.TravelJury.com - For travellers, By travellers