?
Solved

I wish to enable CGI on on my redhat ES box

Posted on 2004-08-03
4
Medium Priority
?
221 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

Flexible connectivity for any environment

The KE6900 series can extend and deploy computers with high definition displays across multiple stations in a variety of applications that suit any environment. Expand computer use to stations across multiple rooms with dynamic access.

Question has a verified solution.

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

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…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

770 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