0

I have my Apache showing perl scripts as plaint text, not executing them. Googling and playing with settings made me frustrating, because there are numerous and long samples, which are mostly ignored by my server.

The question is: what are absolutely necessary minimal requirements to run Perl CGI scripts on my web site?

Please no security issues, no other issues, only running Perl.

Currently I have Apache2 installed, mod_perl installed, perl installed, virtual hosts installed, execution permission granted.

And I have index.cgi is displayed as plain text.

The following is my size config:

enter image description here

One special question is: why AddHandler directive is silently ignored twice? If it was explicitly said, that .cgi files should be handled by cgi-script, then how this can be silently ignored (no any warning in logs).

From my point of view, any directive should be either executed or caused an error. It can't just hang in the air as if it was no any directive at all.

UPDATE

The files are Bugzilla installation. I.e. there are plenty of *.cgi files with perl code inside.

Suzan Cioc
  • 2,643

1 Answers1

0

mod_perl isn't necessary to run Perl CGI scripts in Apache. (But it may speed up some of them.)

What may be missing but isn't clear due to the rather incomplete configuration shown above, is, if mod_cgid or mod_cgi are loaded. In Apache 2.2, it depends on the MPM which of those two you have to use.

If you're on Debian or Ubuntu, calling a2enmod cgi or a2enmod cgid plus a service apache2 restart may already suffice to solve your issue. Not sure if these helper scripts are available on other distributions, too.