Differences between revisions 2 and 3
Revision 2 as of 2007-07-04 20:27:25
Size: 691
Editor: pctony
Comment: Flattening Project
Revision 3 as of 2009-09-20 22:13:22
Size: 691
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

Attempt to invoke directory as script

This occurs when Apache is configured with ScriptAlias or SetHandler and a request is made for a directory path. The problem is that under those circumstances, all resources under a certain path are considered to be executable.

To get around this and allow DirectoryIndex to work again, use AddHandler with Options ExecCGI, or SetHandler in a <Files> stanza.

For example, replace this:

ScriptAlias /cgi-bin /var/www/cgi-bin

with this:

Alias /cgi-bin /var/www/cgi-bin
<Directory /var/www/cgi-bin>
 AddHandler cgi-script cgi pl
 Options ExecCGI

DirectoryAsScript (last edited 2009-09-20 22:13:22 by localhost)