Skip to main content
Commonmark migration
Source Link

The DirectoryIndex directive does not control access to the directory's contents. Access/permissions are usually specified in the Directory items.

If you look at the error-log, e.g., /var/log/httpd/error.log (different with different systems), you might see an error with this message:

attempt to invoke directory as script 

for which the documentation says

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.

and it gives an example which you may find useful, by turning off the ScriptAlias, and restoring the equivalent using AddHandler cgi-script cgi pl within the Directory options.

The DirectoryIndex directive does not control access to the directory's contents. Access/permissions are usually specified in the Directory items.

If you look at the error-log, e.g., /var/log/httpd/error.log (different with different systems), you might see an error with this message:

attempt to invoke directory as script 

for which the documentation says

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.

and it gives an example which you may find useful, by turning off the ScriptAlias, and restoring the equivalent using AddHandler cgi-script cgi pl within the Directory options.

The DirectoryIndex directive does not control access to the directory's contents. Access/permissions are usually specified in the Directory items.

If you look at the error-log, e.g., /var/log/httpd/error.log (different with different systems), you might see an error with this message:

attempt to invoke directory as script 

for which the documentation says

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.

and it gives an example which you may find useful, by turning off the ScriptAlias, and restoring the equivalent using AddHandler cgi-script cgi pl within the Directory options.

Source Link
Thomas Dickey
  • 79.3k
  • 9
  • 189
  • 290

The DirectoryIndex directive does not control access to the directory's contents. Access/permissions are usually specified in the Directory items.

If you look at the error-log, e.g., /var/log/httpd/error.log (different with different systems), you might see an error with this message:

attempt to invoke directory as script 

for which the documentation says

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.

and it gives an example which you may find useful, by turning off the ScriptAlias, and restoring the equivalent using AddHandler cgi-script cgi pl within the Directory options.