Solved

I wish to enable CGI on on my redhat ES box

Posted on 2004-08-03
4
217 Views
Last Modified: 2010-03-04
hi

I wish to enable CGI on my REDHAT box  what configuration changes installs do i need to make.

as i wish to setup squid cache manager.

Cheers

Jason
0
Comment
Question by:madforit2501
4 Comments
 
LVL 9

Expert Comment

by:ronan_40060
ID: 11707823
Hi Jason

To enable cgi

Open httpd.conf and find AddHandler uncomment and add


  AddHandler cgi-script .cgi

This tells Apache that files with extensions .cgi  must be executed.


0
 
LVL 15

Expert Comment

by:periwinkle
ID: 11708459
A quick comment to the above - after making changes,  be certain to restart Apache so that it reads the configuration file. :)
0
 
LVL 15

Accepted Solution

by:
samri earned 125 total points
ID: 11822306
pretty much there is two ways of doing it:

1.  By ScriptAlias (http://httpd.apache.org/docs-2.0/mod/mod_alias.html#scriptalias)
  This method would cause everything in the directory defined in ScriptAlias to be CGI (to be executed by the server).
2.  By setting special handler (just like Ronan mentioned), AddHandler (http://httpd.apache.org/docs-2.0/mod/mod_mime.html#addhandler)
  This method would only cause files defined by AddHandler directive to be executed (as what ronan mentioned, anything with .cgi extension would be excuted), BUT... you would need to add +ExecCGI in the Option directive for the respective folder that you need the file to be executed.  For example, if you had

AddHandle cgi-script .cgi .pl

Alias /somepath /some/path
<Directory /some/path>
   Options +ExecCGI
</Directory>

Alias /anotherpath /another/path
<Directory /another/path>
   Options -ExecCGI
</Directory>

Those .pl and .cgi file in /some/path will be executed as CGI but those in /another/path would not.  And again, you would need to check the global definition <Directory />..</Directory>.. which in most case would not defined ExecCGI, for some reason.

More information:
http://httpd.apache.org/docs-2.0/howto/cgi.html
http://httpd.apache.org/docs-2.0/mod/mod_cgi.html
0

Featured Post

Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
local dns 2 167
XAMPP 3 68
Need to redirect request from IIS server to old Apache Server. 3 144
How to find Tomcat initial memory and Max memory through command line windows 12 232
Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question