I have posted this under "General Help", but I think this may be a better place for it. Unfortunately I don't know how to move the topic from GH to here, so I'm double-posting. Please excuse me.
OK, interesting problem: I seem to have perl, mod_perl, and apache2 installed so that they work (meaning I get messages saying they are installed and active), but I cannot get perl scripts or cgi to run from a browser.
cgi is enabled, so is perl.
I believe this is a configuration problem, but I'm having trouble figuring out how to troubleshoot it. No significant messages show up in the tail of /var/log/apache2/error.log.
My httpd.conf has:
PerlModule ModPerl::Registry
ScriptAlias /perl var/www/perl/
<Location "/perl/">
SetHandler perl-script
PerlHandler ModPerl::Registry
Options +ExecCGI
</Location>
and I do have a perl directory in /var/www/perl with a couple of small test scripts. However, connecting to the url http://XXX.XXX.XXX.XXX/perl/mperltest.pl gives me a message saying the url cannot be found on the server. I thought the "/perl/" in the config file became a place holder for the url. Am I misunderstanding this?
My goal is to run perl scripts through the website. Once I get mod_perl working I expect to install mason, but at this point I would be very happy just being able to run perl scripts from the cgi-bin and/or the test directory I created under /var/www.
Since I originally started this post, I found an entry that suggested I put This in my /etc/apache2/mods-enabled/perl.conf file:
<Files ~ "\.(pl|cgi)$">
SetHandler perl-script
PerlResponseHandler ModPerl:erlRun
Options +ExecCGI
PerlSendHeader On
</Files>
This doesn't seem to help me run a perl script from the browser, but I did finally get an interesting message when I restarted Apache:
[error] slurp_filename('/etc/apache2/var') / opening: (2) No such file or directory at /usr/lib/perl5/ModPerl/RegistryCooker.pm line 541
The content (cat -n /usr/lib/perl5/ModPerl/RegistryCooker.pm) at line 541 is:
541 $self->{CODE} = eval { $self->{REQ}->slurp_filename(0) }; # untainted
There is no /etc/apache2/var file, and I don't know why it's looking for it.
Somewhere, somebody knows where there is simple, explicit step-by-step directions for configuring and testing mod_perl 2. (A lot of instruction seems to apply to earlier versions of mod_perl, and doesn't seem to work.)
Any help would be appreciated.
Thanks in advance,
Mike
Bookmarks