Krist van Besien wrote:
Hello,

The folllowing piece:

     1 <Perl>
     2 $VirtualHost{"0.0.0.0"} = {
     3      DocumentRoot => "/home/foo/webservers/wiki.foo.net/htdocs",
     4      ServerName => "wiki.foo.net",
     5   };
     6
     7
     8 </Perl>

Creates a virtual host that is equivalent to the following code:

<VirtualHost *.*>
   ServerName wiki.foo.net
   DocumentRoot /home/foo/webservers/wiki.foo.net/htdocs
</VirtualHost>

How do I, however, add a second virtualhost. Adding another
$VirtualHost{"0.0.0.0"}=...
only overwrites the first definition.

By adding another host that way you are overwriting the first hash key. I'm not a PerlSections expert, but you might be able to say:

push @{$VirtualHost{"0.0.0.0"}}, { # virtual host n details };

Reply via email to