To enable mod_perl with Apache2 on Debian & Ubuntu for all directories served up by Apache2, including user directories such as ~/public_html, add the following lines to /etc/apache2/sites-available/default
# enable mod_perl <Files ~ ".(pl|cgi)$"> SetHandler perl-script PerlResponseHandler ModPerl::Registry Options +ExecCGI PerlSendHeader On </Files>
In a real production environment you probably don’t want to enable this for all directories that Apache2 serves up, but only from those directories you expect to run perl in.
Thanks to this thread on the Ubuntu Forums for the info.
Titled updated as per Ozkar’s suggestion.
this was really helpfull man, but you need to changue the tittle since this works with every apache.
im sing archlinux it worked.
Hi Ozkar,
Glad you found it useful, and good to know it work on other Linuxes too. I’ll update the title! 🙂
Thanks
Mick
Thank you, you are the man!
I am a newbie to programming in Perl.
I’ve found your tip is helpful.
Thanks Simon.