httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <do...@covalent.net>
Subject Re: [perl-framework] SSL certs/keys for non-mod_ssl
Date Thu, 13 Dec 2001 17:27:47 GMT
On Thu, 13 Dec 2001, Rodent of Unusual Size wrote:

> You know what's popping my corn right now?  Trying to
> find out where the flippin' .conf files get a lot of their
> contents.  For instance, t/conf/extra.conf contains:

it is generated from this config in extra.conf.in:
<IfModule mod_echo.c>
    <VirtualHost mod_echo>
        ProtocolEcho On
    </VirtualHost>

    <IfModule @ssl_module@>
        <VirtualHost mod_echo_ssl>
            ProtocolEcho On
            SSLEngine On
        </VirtualHost>
    </IfModule>
</IfModule>

whenever there is a  <VirtualHost mod_foo> and mod_foo is available, it
is expanded into:
Listen $port_counter
<VirtualHost _default_:$port_counter>
    ServerName $servername:$port_counter

where $port_counter starts at the default 8529 and is incremented for each
VirtualHost.  <VirtualHost mod_foo_ssl> is expanded the same way, but only
if $ssl_module (normally mod_ssl.c) is also available.

the port number can then be looked up on the client side
using the module name.  t/protocol/echo.t for example:
my @modules = qw(mod_echo);

if (Apache::Test::have_ssl()) {
    $tests *= 2;
    unshift @modules, 'mod_echo_ssl';
}

for my $module (@modules) {

    my $sock = Apache::TestRequest::vhost_socket($module);

first time through, $sock is a socket connected to the port mod_echo is
listening on, second time is mod_echo with SSL enabled.

the routine that does the parsing/expansion for vhosts is
Apache::TestConfig::parse_vhost.



Mime
View raw message