From: Joshua Slive
Alias /cgi-bin/ /web/cgi-bin/
- <Directory /web/cgi-bin >
+ <Location /cgi-bin >
SetHandler cgi-script
Options +ExecCGI
- </Directory>
+ </Location>
DocumentRoot
in order to
avoid accidentally revealing their source code if the
configuration is ever changed. The
@@ -382,8 +382,20 @@ target as a CGI script
URL and designating CGI scripts at the same time. If you do
choose to place your CGI scripts in a directory already
accessible from the web, do not use
- ScriptAlias
. Instead, use <Directory>
, SetHandler
, and Options
as shown in the second example
- above.ScriptAlias
. Instead, use <Directory>
, SetHandler
, and Options
as in:
+
+ <Directory /usr/local/apache2/htdocs/cgi-bin >
+
+ SetHandler cgi-script
+ Options ExecCGI
+
+ </Directory>
+
ScriptAlias
and revealing the source code
+ of the CGI scripts if they are not restricted by a
+ Directory
section.