Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: null

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:

No Format
ScriptAlias /cgi-bin /var/www/cgi-bin

with this:

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