See my last post below, then retry this again.
Hmmm...try:
This should present meaningful alternatives. It does works on my server but it runs Gutsy 7.10 (not Karmic)
Here is my outputs, and it's good to have around when looking at Apache2 documentation.
Code:
apache2 -t -D DUMP_MODULES
Loaded Modules:
core_module (static)
log_config_module (static)
logio_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
alias_module (shared)
auth_basic_module (shared)
authn_file_module (shared)
authz_default_module (shared)
authz_groupfile_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgi_module (shared)
dir_module (shared)
env_module (shared)
mime_module (shared)
negotiation_module (shared)
php5_module (shared)
setenvif_module (shared)
status_module (shared)
Syntax OK
To continue the testing.
First edit your /etc/apache2/sites-available/<configuration-file>
Add to your virtual host:
Code:
SetEnv PERL5LIB /path/to/your/locallib
Also in the same file,
ensure you have a directory stanza to enable perl execution with
Code:
<Directory /directory/were/you/have/scripts>
Options +ExecCGI
SetHandler cgi-script
</Directory>
Here is short perl test script to test 'SetEnv' and what Apache pass along to the script.
Code:
#!/usr/bin/perl -w
use CGI qw(:standard);
print header ;
print "PERL5LIB is: $ENV{PERL5LIB}\n" ;
print "Apache can read: $ENV{PERL5LIB}\n";
print end_html ;
Ensure that your script can execut and load modules (eg. your own MyModule::Test) with a line in the beginning of a test script like so
use lib /path/to/your/locallib ;
use Mymodule::Test ;
There are some bug details on launchpad related to APACHE_RUN_USER/APACHE_RUN_GROUP.
Good luck.
PS I have had no sucess using Apache2 'PassEnv'.
Bookmarks