PerlOptions +Parent and virtual hosts

PerlOptions +Parent and virtual hosts

am 01.05.2009 09:06:25 von Bryn Dyment

Hello,

I have successfully been using name-based virtual hosts and have just
added "PerlOptions +Parent" as a way to have multiple branches of my
codebase running on the same server. A typical virtual host is
configured as:


ServerName trunk.translator.xcma.devo
DocumentRoot C:\depot\trunk\perl\xcma\translator\html

PerlOptions +Parent


use lib 'C:\depot\trunk\perl\common';
use lib 'C:\depot\trunk\perl\xcma\common';
use lib 'C:\depot\trunk\perl\xcma\translator';


PerlRequire C:\depot\trunk\perl\xcma\translator\translator.pl

PerlSetVar MasonAutohandlerName autohandler.mas
PerlSetVar MasonCompRoot "site =>
C:\depot\trunk\perl\xcma\translator\html"
PerlAddVar MasonCompRoot "comp => C:\depot\trunk\perl\common\html"
PerlSetVar MasonDataDir
C:\WINDOWS\Temp\mason\trunk.translator.xcma.devo
PerlSetVar MasonEscapeFlags "h =>
\&HTML::Mason::Escapes::basic_html_escape"


SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler



The only difference versus the other virtual hosts is the replacement
of "trunk" with "release".

When I launch Apache, it crashes unless I also have the following
virtual host configured at the end of my httpd.conf:


ServerName localhost
DocumentRoot C:

PerlOptions +Enable


I've found that I can have any perl-related directive in place of
"PerlOptions +Enable" (e.g., replaced with "PerlModule HTML::Mason").
If I remove the directive, or if I remove this virtual host
altogether, it crashes (with no error). This is on Windows ... my
development environment ... haven't experimented on my Linux server
yet.

Hoping somebody can help ... thanks!