I'm curious, how would this be
possible with mod_perl? The below will fail as:$r->add_config() has failed: <VirtualHost not allowed hereand when $r->add_config is changed to $r->server->add_config it will fail as: Can't run '$s->add_config' after server startup In /etc/hosts 127.0.0.1 local.example.comIn httpd.conf PerlInitHandler Apache::Handlers::MyInitHandlerIn Apache/Handlers/MyInitHandler.pm: package Apache::Handlers::MyInitHandler; use strict; our $VERSION = 0;
use Apache2::RequestUtil ();
use Apache2::Const -compile => qw(DECLINED);
sub handler {
my $r = shift;
$r->add_config([
'<VirtualHost *:80>',
'ServerName local.example.com',
'DocumentRoot /var/www/example.com/htdocs',
'<Directory /var/www/example.com/htdocs>',
'Order allow,deny',
'Allow from all',
'AllowOverride None',
'Options None',
'</Directory>',
'</VirtualHost>',
]);
Apache2::Const::DECLINED;
}
1;
Perrin Harkins wrote: On Fri, Mar 28, 2008 at 8:30 AM, Valerio <[EMAIL PROTECTED]> wrote: |
- Virtual host with mod_perl Valerio
- Re: Virtual host with mod_perl Roberto C . Sánchez
- Re: Virtual host with mod_perl Valerio
- Re: Virtual host with mod_perl André Warnier
- Re: Virtual host with mod_perl Valerio
- Re: Virtual host with mod_perl Valerio
- Re: Virtual host with mod_perl Perrin Harkins
- Re: Virtual host with mod_p... Ryan Gies
- Re: Virtual host with m... Perrin Harkins
- Re: Virtual host with m... Valerio
- Re: Virtual host with m... Torsten Foertsch
- Re: Virtual host with m... Valerio
- Re: Virtual host with m... Ryan Gies
