[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-modperl
Subject: Re: Virtual Hosts in "Perl" sections.
From: Fred Moyer <fred () redhotpenguin ! com>
Date: 2006-09-25 0:33:06
Message-ID: 451723C2.8030800 () redhotpenguin ! com
[Download RAW message or body]
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 };
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic