Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

I wish to enable CGI on on my redhat ES box

Posted on 2004-08-03
4
Medium Priority
?
222 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 375 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month9 days, 16 hours left to enroll

610 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