Solved

I wish to enable CGI on on my redhat ES box

Posted on 2004-08-03
4
213 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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Suggested Solutions

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now