httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jon schatz <...@divisionbyzero.com>
Subject Re: keeping multiple httpd.conf synchronized
Date Wed, 13 Feb 2002 23:05:13 GMT
On Wed, 2002-02-13 at 14:45, Farid Hamjavar wrote:
> I  am asking  the  question above  based  on the  assumption
> that the  httpd.conf for web-server-1 and  web-server-2 thru
> web-server-N  are  %100 identical  and  differ  only in  the
> occurrence of server name and IP#.

one way is to compile in mod_perl, and use the Perl directive. This
example config would take the servername and ip from the current machine
info (web-server-N):

httpd.conf:
<--snip-->
<Perl>
chomp(my $hostname = `hostname`);
my $ip = join ".", unpack('C4, gethostbyname($hostname));
$Listen = "$ip:80";
$ServerName = $hostname;
</Perl>

the perl configuration directives are pretty powerful...

-jon

-- 
jon@divisionbyzero.com || www.divisionbyzero.com
gpg key: www.divisionbyzero.com/pubkey.asc
think i have a virus?: www.divisionbyzero.com/pgp.html
"You are in a twisty little maze of Sendmail rules, all confusing." 

Mime
View raw message