Howdy

I've searched, and searched, for a recipe and/or method for this; I can't find 
one that works :(

Am using a home-rolled Apache 2.0.48 and mod_perl 1.99_10 setup.

Given a file containing lines of the form:

lweb1.graemef.net root /root/public_html 192.168.100.211

and an "Include" statement in my httpd.conf pointing at a file containing:

<Perl>
# Use strict, effectively
$Apache::Server::StrictPerlSections = 1;
# Save config for later
$Apache::Server::SaveConfig = 1;
my $vhosts = "/etc/httpd/conf.d/vhosts.txt";
open VHOSTS, "<$vhosts" or die "Could not open $vhosts: $!\n";
while (<VHOSTS>) {
  next if $_ =~ /^#/;
  chomp;
  my ($vhostname,$vhostuser,$vhosthomedir,$vhostip) = split $_, / /;
  $VirtualHost{$vhostip}{ServerName} = $vhostname;
  $VirtualHost{$vhostip}{DocumentRoot} = $vhosthomedir;
  $VirtualHost{$vhostip}{SuexecUserGroup} = $vhostuser;
}
close VHOSTS;
</Perl>

...I don't get the vhosts setup; equally I don't get any errors.
I know the Perl section gets parsed correctly (I've straced it through) and 
I've put some debug print statements in and have got out the expected data.

I get the expected output from /server-info in that it shows the <Perl></Perl> 
section correctly, but I'm damned if I can get it to do the config for me.

It's probably dreadfully easy, but would someone point me in the right 
direction?

TIA

Graeme


-- 
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html

Reply via email to