Enabling raw CGI on the RAQ550

Posted in: Linux
By dePoPo
Mar 10, 2009 - 12:50:56 PM

Q: [APACHE] Enabling raq CGI on the RAQ550

APACHE - Enabling CGI
Ig used with care, you can use this procedure on a Cobalt RAQ550 to bypass the cgi-wrapper and enable raw cgi support. (not a good idea on shared machines)

 

I am attempting to run a cgi script on my server, but it won't allow the script to run. How can I enable CGI?

By default, the APACHE server's configuration has CGI turned off. Turning it on is a rather simple matter. In the example shown below, you will be able to call your scripts with a URL such as:

http://bignosebird.com/cgi-bin/scriptname.cgi or from within your documents as /cgi-bin/scriptname.cgi

To do this, you MUST have access to the master server configuration files. If you are unable to edit these files, ask your system administrator to do it for you.

Edit the file srm.conf file and do the following:

Find this line.

#ScriptAlias /cgi-bin/ @@ServerRoot@@/cgi-bin/

Change it to read as follows, but of course substitute the full unix path to the directory containing your scripts if it is different than what is shown below.

ScriptAlias /cgi-bin/ /usr/local/apache/share/cgi-bin

Then, track down this line:

#AddHandler cgi-script .cgi

and make it read as follows:

AddHandler cgi-script .cgi

Next, edit the file access.conf file and find this section of code:

 

AllowOverride None
Options None

 

and change the Directory to the same value that you used when editing the srm.conf file.

After making these changes, restart the server and your scripts should run- provided you did a good job debugging them first. ;-)



Visitor Comments