Apache 2.2->2.4 Upgrade, cgi no longer working

4182
lvc

I'm running ArchLinux, and have recently upgraded Apache from 2.2 to 2.4, and updated my config (by manually merging in the changes from the new default config file). My CGI scripts that were previously running now do not - I see the source code of the CGI script. The script is world executable, and - more to the point - the permissions haven't changed since it was known to be working.

The root folder, which is where the script lives, does has CGI enabled in httpd.conf:

DocumentRoot "/srv/http" <Directory "/srv/http"> Options Indexes FollowSymLinks ExecCGI Includes 

the MIME settings have .cgi configured like so:

<IfModule mime_module> AddHandler cgi-script .cgi 

and the mime_module is being loaded.

How do I get my CGI scripts running again?

0

2 ответа на вопрос

0
bonob

Did you have a look at http://httpd.apache.org/docs/2.4/upgrading.html?

When doing the same a while ago, I found that the main change for me was the access control, e.g.:

In this example, all requests are allowed.

2.2 configuration:

 Order allow,deny Allow from all 

2.4 configuration:

 Require all granted 

You might find that you have such access controls to change in your config files.

0
lvc

Apparently when I was merging the configs, I managed to disable mod_cgi. Uncommenting the line:

LoadModule cgid_module modules/mod_cgid.so 

did the trick.