I have a website I am relocating to an SME server (it is currently running on a Cobalt server)
I would like to user a "cgi-wrapper" handler to run my cgi's (as opposed to the default "cgi-script" handler that is deployed with e-smith)
I have tried a "proof of concept test" by manually editing the httpd.conf, changing the line:
AddHandler cgi-script .cgi
to read
AddHandler cgi-wrapper .cgi
As the cobalt server's httpd.conf reads, and then done an "apachectl restart" to restart the httpd process, and this appears to simply disable http entirely - it simply returns the cgi source code instead of running it - permissions etc are ok, and the script does work when the server is set to work using the cgi-script handler - ie it just runs with the www user, instead of the user who owns cgi file (which is the way it works on cobalt). as a further test, i renamed the cgi-wrapper handler line to read:
AddHandler cgi-bollox .cgi
and restarted apache, with the same effects as using cgi-wrapper.
conclusion: there must be something missing from the sme deployment/configuration to recognishe what "cgi-wrapper" actually means (some module i need to load etc).
anyone out there have ideas what this might module/configuration setting might be?
obvously editing the httpd.conf is not a permanent solution for the sme server setup, as i will need to edit the templates etc, i just prefer to do tests this way before setting them in concrete - easy to put back to "default" using web config panels.
my test cgi file is shown below.
------------index.cgi begins-----------
#! /bin/bash
# send http header and html body open tags
echo -n "Content-type: text/html
cgi blah
the user here is : "
# dump user id to stdout
whoami
echo "
"
echo "Tasks currently running for whoami are:
"
# display running tasks, including detached processes (for this user)
ps -x
# close html body
echo "
"
------------index.cgi ends-----------