httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Myers <...@sumthin.nu>
Subject Re: multiple configurations
Date Tue, 15 Jan 2002 04:06:12 GMT
On Jan 15, 2002 at 11:25:06 +0800, Stas Bekman wrote:
> 
> >>I think the first thing to figure out is whether you can have all the 
> >>desired configuration co-exist using VirtualHosts, so you won't need to 
> >>restart the server. I think you should be able to accomplish that.
> >>
> >>Once you do, I can think of many .pm response handlers include some 
> >>httpd.conf bits in various VirtualHosts. So you can re-use these.
> >>
> > 
> > Been there. :)
> > 
> > # global
> > NewDirective On
> > <VirtualHost 1.2.3.4>
> > 	ServerName foobar
> > 	NewDirective Off
> > </VirtualHost>
> > <VirtualHost 1.2.3.4>
> > 	ServerName bazbam
> > </VirtualHost>
> > 
> > vs.
> > 
> > # global
> > NewDirective Off
> > <VirtualHost 1.2.3.4>
> > 	ServerName foobar
> > 	NewDiretive Off
> > </VirtualHost>
> > <VirtualHost 1.2.3.4>
> > 	ServerName bazbam
> > </VirtualHost>
> > 
> > In each case, how should the bazbam virtual react? And the
> > better question (and the reason for testing) is, will my
> > module do what it's supposed to do? I don't see much way
> > around restarting the server to test for that.
> 
> 
> That's true, unless you can test the directive from within VirtualHost, 
> i.e. not to set it on the global level at all. something like that:
> 
> 
> <VH ..>
>    ND On
>    <Loc ...>
>      ND Off
>    </Loc..>
> 
>    <Loc ...>
>      ND On
>    </Loc..>
> </VH>
> 
> <VH ..>
>    ND Off
>    <Loc ...>
>      ND Off
>    </Loc..>
> 
>    <Loc ...>
>      ND On
>    </Loc..>
> </VH>
> 
> so each VH behaves as a standalone server.

Yes, but I'm talking about an RSRC_CONF directive. It can
only live in global or virtual-global space. It can't live
anywhere below the global section of a virtual host.

> > Sorry, but you've lost me now.
> > 
> > Running t/TEST myself will be three seperate test runs and
> > muck up a normal ``perl Makefile.PL && make && make test &&
> > make install''.
> > 
> > Letting the test suite run itself three times though still
> > isn't going to do what you suggest, since it doesn't restart
> > the server. The server won't recognize the IfDef's until it
> > restarts, right?
> 
> That's correct. It won't. I guess that when <Perl> sections will be 
> implemented, it'll be possible to reconfigure the server from Perl and 
> then HUPing it will get you a server with new configuration. Just an idea.

It seems we've come full circle. :)

Rick Myers                            rik@sumthin.nu
----------------------------------------------------
The Feynman Problem       1) Write down the problem.
Solving Algorithm         2) Think real hard.
                          3) Write down the answer.

Mime
View raw message