所以我有一个apache-2.4.25(在Debian / stretch中打包),并且想要使用SSI的exec方法。
<!--#exec cmd="ls" -->
不幸的是,这给了我一个错误:
[an error occurred while processing this directive]
在它所说的日志文件中
unknown directive "exec" in parsed doc /path/to/some/user/public_html/ssitest/index.shtml
我追踪到在我的userdir.conf (禁用SSI的exec指令)中启用了Options +IncludesNOEXEC 。 所以我试着把这个选项closures一个特定的VHost,把以下内容放到VirtualHost部分:
Options -IncludesNOEXEC Options +Includes
不幸的是,这并没有帮助。
所以我尝试在Directory部分,但仍然没有运气:
Alias /ssitest/ /path/to/some/user/public_html/ssitest/ Options -IncludesNOEXEC Options +Includes <Directory /path/to/some/user/public_html/ssitest/> Options -IncludesNOEXEC Options +Includes </Directory>
每当我尝试访问我的页面时,遇到处理此指令错误时发生的错误。
那么有没有办法来禁用以前设置的选项?