I am attempting to enable mod_perl on a fresh install of Lucid Lynx (ubuntu 10.04).
I have the libapache2-mod-perl2 installed, but I can't seem to get the .pl file to run instead of being downloaded.
-Perl 5.10.1
-Apache 2
I installed the "LAMP" configuration on install.
mod_perl may not be what you are looking for. Is the perl script designed to be run with mod_perl or is it a cgi script?
First, lets consider that it is a cgi script and not really meant to be run as mod_perl. If that was the case, in your block of your config, you could put:
If the script had a proper #!/usr/bin/perl line at the top, and was able to be executed, apache should then serve it as a CGI script.
However, if you really do want to use mod_perl, you generally need to write a handler inside your VirtualHost config like:
you might also need to put:
to do your environment fixups. Generally, mod_perl handlers are .pm files and are packages rather than .pl files.