I have a set of cgi scripts which run on a RHEL 6.x (with Apache 2.2) box fine.
There is a cgi-bin directory containing the scripts, plus an index.html (pure html) which serves as a front end to the scripts, allowing me to click on a button to invoke whichever script I want to.
Deploying the same set of scripts on a RHEL 7.x box with Apache 2.4, this config no longer works.
I found the "Require all granted" directive that I had to change between 2.2 and 2.4, but I think there must be something else too.
The error messages I get when trying to load index.html are as follows:
AH01215: (13)Permission denied: exec of '/path/to/index.html' failed End of script output before headers: index.html
I have a ScriptAlias directive in place for my cgi-bin directory.
What I'm taking from all this is that apache is assuming that everything in this directory is a script, and it is trying to execute index.html via CGI.
Which I guess is fair, but this configuration worked in 2.2, so I'm wondering if there is some way to make an exemption for .html files, or will I have to rejig my directory structure?
edit:
SELinux was already disabled.
Scripts are delivered via an rpm file, which also includes a .conf file for /etc/httpd/conf.d/
/etc/httpd/conf/httpd.conf is left at RHEL 7.x default for now
The .conf file as delivered by the rpm is this:
ScriptAlias /turnover-client/ /opt/tools/turnover-client/cgi-bin/
Alias /turnover-client /opt/tools/turnover-client/cgi-bin/index.html
<Location /turnover-client>
Order Allow,Deny
Allow from all
</Location>
Which, at the moment, I have changed to this:
ScriptAlias /turnover-client/ /opt/tools/turnover-client/cgi-bin/
Alias /turnover-client /opt/tools/turnover-client/cgi-bin/index.html
<Location /turnover-client>
Require all granted
Options +ExecCGI
</Location>