CGI exec access for .cgi .pl etc. (CERN)

CGI exec access for .cgi .pl etc. (CERN)

Post by L Jason colt » Fri, 11 Aug 1995 04:00:00



Hmm.  I thought I'd find this in the FAQ...

I'd like to execute scripts (all in perl currently) in various directories
on my web server (CERN 3.0), and I've grown quite tired of adding a line
to the httpd.conf and restarting the server every time I create a new
directory I'd like to have executable files in.  So I'd like to set things
up so that every file ending in certin suffixes (.cgi or .pl or .perl etc.)
will be executed, and the results spat out in a polite fashion.

I did some exploring through the CERN documentation, and it appears that
my solution might be the addition of a MIME type to the conf file with an
"AddType" line.  However, I couldn't find what this type actually should be.  
NCSA's HTTPD provides an example, mapping .cgi to "x-httpd-cgi", so I tried
that type with the line:

        AddType .cgi    application/x-httpd/cgi binary

but that does not seem to work.  Does "application" mean only that the
actual browser attempts to process the file it is given by executing
a local application?  Hmm, I don't need to give the browser an instruction,
but the server.  I think I'm going down the wrong track.  Oh, bother.  
I think this .cgi-executable-anywhere thing is relatively common.   But
how is it done?

Thanks.

-Jason.


                     http://www.wam.umd.edu/~ljason/