On Friday 15 December 2006 13:49, Alan wrote:
> <Perl>
> #!perl
> foreach my $host ( qw( foo bar baz) ) {
>
>    push @PerlConfig, <<EOF;
> <VirtualHost xx.xx.169.216:80>
>       DocumentRoot   /home/httpd/vhosts/${host}.com/
>       ServerName     ${host}.com
>       ServerAlias    www.${host}.com
>       DirectoryIndex index.html index.shtml index.htm index.php
>       CustomLog      /usr/local/apache/logs/${host}-access.log common
>       ErrorLog       /usr/local/apache/logs/${host}-error.log
>         [...] you get the picture
>       ScriptAlias /cgi-bin/ "/home/httpd/vhosts/${host}.com/cgi-bin/"
> </VirtualHost>
>
> EOF
> }
> __END__
> </Perl>
>
> Mod_Perl docs have more info, but that's the gist of it.

that's pretty close, thanks. My only worry is how do I hook up database into 
it so that I don't initiate connection with MySQL per-request, but rather 
have some pooling or otherwise reuse same connection since there are not 
updates - only selects.

-- 
Dmitry Makovey
Web Systems Administrator
Athabasca University
(780) 675-6245

Attachment: pgp6LfbVYavJB.pgp
Description: PGP signature

Reply via email to