in reply to Updating config files with dynamic ip
Anyway, it's just an example of what can be done. Space is the limit... (most likely; the physicists haven't worked that one out yet)<Perl> my $server = "perlmonk.org"; my @users = do { local @ARGV = "/etc/perlmonk_users"; <> }; chomp @u +sers; foreach my $user (@users) { push @{ $VirtualHost{"*"} } , { ServerName => "$user.$server", ServerAdmin => "$user\@$server", DocumentRoot => "/home/$user/public_html", ScriptAlias => [ "/cgi-bin/", "/home/$user/public_html/cgi-bin/" + ], CustomLog => [ "/home/$user/www_logs/access_log", "common" ], ErrorLog => "/home/$user/www_logs/error_log" }; } </Perl>
|
|---|