I am trying to get cgi scripts working with a clean build of httpd-2.4.6 on SciLinux 6 - x86_64.
My httpd.conf file: http://pastebin.com/P0CKYfqU
This is essentially the one that was installed - with a few edits.
I do have:
ScriptAlias /cgi-bin/ "/var/tmp/apps/cgi-bin/"
in the httpd.conf file.
I built httpd using the following configure command:
./configure --prefix=/var/tmp/apps --with-apr=/var/tmp/apps/bin/apr-1-config --with-apr-util=/var/tmp/apps/bin/apu-1-config --with-pcre=/var/tmp/apps/bin/pcre-config --enable-cgi
I have done the following to /var/tmp/apps/cgi-bin/printenv
- edited the #! line
- done chmod a+rx
The command works from the command line.
However, when I go to localhost:8001/cgi-bin/printenv I just see the script itself - not the output of the script.
I'm sure I must be missing a configure option or an httpd.conf directive.