mod_perl 2.x VirtualHost config failing


Sep 28, 2008
Hi all,

I believe I am close to having mod_perl 2 installed on Apache 2.0.63. After compiling and installing the DSO from source, and adding the LoadModule line via the Pre VirtualHost Include section of the WHM Apache Include Editor, Apache now reports (as expected):

Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8b mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/ PHP/5.2.5 mod_perl/2.0.4 Perl/v5.8.8 Server at Port 80
So, mod_perl 2.0.4 has been loaded! Thinking victory was now inevitable, I created /usr/local/apache/conf/userdata/std/2/user/ and added an appropriate PerlRequire and Location block. However, that config is not being picked up, because apparently /scripts/verify_vhost_includes doesn't like it:

pts/0 [email protected]:/usr/local/apache/conf/includes #> /scripts/verify_vhost_includes --show-test-output
Testing /usr/local/apache/conf/userdata/std/2/user/
        No changes made without --commit flag
Syntax error on line 2 of /usr/local/apache/conf/userdata/std/2/user/
Invalid command 'PerlRequire', perhaps mis-spelled or defined by a module not included in the server configuration

My huch: verify_vhost_includes seems to process the configs really fast... perhaps too fast to have actually loaded, so that httpd would understand mod_perl's "PerlRequire" directive (and, probably, the other mod_perl-specific directives that will come later in my .conf file).

I trust the VirtualHost config: I am no stranger to mod_perl configuration, and, to be absolutely sure, I pasted the contents of the mod_perl.conf from a known-good Apache 2 configuration running on my development environment (which runs Ubuntu, no WHM). Line 1 is blank, so line 2 is really the first command in the file.

Is there a catch-22 here? Surely someone else has installed mod_perl 2 under WHM before, but I could not find much. Of course, I Googled and searched these forums to get this far, but am unfortunately stuck at this point. So I have two questions:

1. Have I missed any important steps? I'm experienced with Apache configuration on its own, but not under WHM.

2. Whether my hunch is correct or not, any thoughts on what I need to do next, to get my VirtualHost loaded with the mod_perl directives such as PerlRequire?

Any information would be much appreciated!