in reply to execution of CGI scripts

The answer you seek is specific to the web server you're operating under. In general, the method of distinguishing executable files is configurable, but the configuration must be done with respect to the web server. Apache has one way of doing it, other web servers have other ways. And yes, you may set the server to find CGI scripts in a particular directory, or with a specific extension.

So check with your server's administrator, or if you are the administrator, check in the manual pages of the web server you're administering. We love to help with Perl questions, but this is a web-server question, and we're not really all that well equipped to provide support for all the various brands and versions of web servers there out there in the world.


Dave

Replies are listed 'Best First'.
Re^2: execution of CGI scripts
by dsheroh (Monsignor) on Oct 23, 2009 at 10:35 UTC
    Actually, Apache has two ways of doing it:
    ScriptAlias /cgi-bin/ "/path/to/cgi-bin/"
    will cause all files accessed via /cgi-bin/ in the URI to be executed as CGI processes, as the OP theorized.
    AddHandler cgi-script .cgi
    will cause all files whose names end with .cgi to be executed as CGI processes, regardless of their location. This could easily be modified to cause CGI execution of, say .pl files if a server admin so desired.