Enabling CGI?
Seth Dimbert
s.dimbert at fhmr.com
Wed Jan 23 21:27:08 CST 2002
<--Newbie Alert!!-->
I'm trying to install a CGI on my new Linux Intranet server. I installed it
fine... the problem is that, when I call the .cgi file, the server returns
the text of the file instead of the result of the script. The help files
from the CGI installer say:
<><><>
If, when you try to load mt.cgi into your browser--or mt-load.cgi or
mt-check.cgi during the installation process--then the problem is that your
webserver does not have CGI scripting enabled in its configuration.
If you run your web site on a hosted provider, you will need to email the
support for this provider and ask them to turn on CGI scripting for your
account (or for the webserver on a whole); this is not something that you
can configure yourself.
If you run your own webserver, or if you have access to the webserver
configuration files--and the privileges to restart the webserver, after
modifying the configuration--you can use these steps to enable CGI scripts
on your webserver. The following instructions assume that you are running
Apache.
Find the configuration file httpd.conf, and open it up in an editor.
Find the Directory or Location block that configures the webroot for the
server.
Inside of that block, add this line:
Options +ExecCGI
Outside of the Directory or Location block, add the line
AddHandler cgi-script .cgi
Restart the webserver.
CGI scripts should now execute, instead of merely displaying their source.
<><><>
I have 2 problems with following these directions:
1) I am at a location different from the server and I don't have rights to
write to /etx/httpd/conf/. But I suppose that's easy enough to fix.
2) I'm scared to change the httpd.conf file since I don't really understand
the instructions.
I can't give y'all the address of the server since it only serves
locally... can someone help me understand?
Thanks!
-SD
More information about the Kclug
mailing list