Seems like it only takes the first vhost. It would help if I knew what all these variables in perl meant.
Code:<perl> #!/usr/bin/perl -w #line <1022> local ($vhost_dir, $doc_root, $name, $vh); $vhost_dir = "/home/web"; opendir(VHOSTS, $vhost_dir); my @file_list = grep(/^[^\.]/,readdir(VHOSTS)); closedir(VHOSTS); foreach $name (@file_list) { $doc_root = "$vhost_dir/$name"; if (-d $doc_root) { $vh={ ServerName => "$name.codedv.com", DocumentRoot => "$doc_root/htdocs", SuExecUserGroup => "$name users", CustomLog => "$doc_root/logs/access_log common", ErrorLog => "$doc_root/logs/error_log", ScriptAlias => "/cgi-bin/ $doc_root/cgi-bin/", Directory => { "$doc_root/cgi-bin" => { Options => "+ExecCGI", Order => "allow,deny", Allow => "from all" } } }; if (-f "$doc_root/conf/httpd.conf") { $$vh{Include} = "$doc_root/conf/httpd.conf"; } $VirtualHost{'10.10.3.2:80'}; } } __END__ </perl>




. It would help if I knew what all these variables in perl meant. 
Reply With Quote