CGIs with Apache on Debian
Dpk
dpk@egr.msu.edu
Wed, 29 Nov 2000 02:36:28 -0500
On Wed, Nov 29, 2000 at 01:49:28AM -0500, Cory Spitz wrote:
Dennis had a bright idea. He told me to take the httpd.conf file
form the Mandrake box and move it to the Debian box. I hacked it
up a little to reflect what the Debian box has and it still doesn't
work. When I add:
AddHandler cgi-script .cgi
it doesn't get executed and I get 500 Internal Server Error. When I
isntall cgiwrap (just like I have on the Mandrake box) and try to add:
AddHandler cgiwrapper .cgi
Action cgiwrapper /cgi-bin/cgiwrap
I get this error on apachectl configtest:
Syntax error on line 889 of /etc/apache/httpd.conf:
Invalid command 'Action', perhaps mis-spelled or defined by a module not
included in the server configuration
Why doesn't this work on Debian?
I believe I have found the reason... Debian ships with "suexec"
installed/enabled. This will cause user CGI scripts to fail since by
default user CGI's do not meet the security of suexec.
If your system is restricted and you do not have to worry about rogue
users, the problem can be fixed by using your original Debian config
and simply disabling suexec:
mv /usr/lib/apache/suexec /usr/lib/apache/suexec.orig
/etc/init.d/apache restart
The above fixed the same exact problem for me (just tested). If you
want to worry about cooperating with suexec see:
http://httpd.apache.org/docs/suexec.html
Hope this helps.
Dennis Kelly
Network Administrator
College of Engineering
Michigan State University