服务器端包括
我在 Apache 日志中收到以下错误消息:
unable to include potential exec "header.html" in parsed file /Users/sikusiku/Sites/ss-git/homepage.shtml
我基本上尝试包含 homepage.shtml 中的 header.html。我在 homepage.html 中使用了非常基本的指令(header.html 和 homepage.shtml 都位于文档根目录中):
<!--#include virtual="header.html" -->
我认为我已在 httpd.conf 中正确打开 SSI:
Options Indexes FollowSymLinks ExecCGI Includes
...
AddType text/html .shtml
...
# XBitHack doesn't have anything to do with this, but I added it anyway.
XBitHack on
我错过了什么吗?包含的文件即 header.html 是否需要进行不同的配置?
I got the following error message in the Apache log:
unable to include potential exec "header.html" in parsed file /Users/sikusiku/Sites/ss-git/homepage.shtml
I basically tried to include header.html from homepage.shtml. I used the very basic directive in homepage.html (both header.html and homepage.shtml are located in the document root):
<!--#include virtual="header.html" -->
I think I have properly turned on the SSI in my httpd.conf:
Options Indexes FollowSymLinks ExecCGI Includes
...
AddType text/html .shtml
...
# XBitHack doesn't have anything to do with this, but I added it anyway.
XBitHack on
Did I miss anything? Does the included file i.e. header.html need to be configured differently?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我刚刚在 ubuntu sever 11.10 上用 apache2 自己修复了这个问题。
我的 /etc/apache2/sites-available/default 文件:
我在 /var/www 目录指令中将 AllowOverride None 更改为 All 。
我的 .htaccess 文件位于 /var/www/.htaccess 中:
最后我确保 include.load 位于 mods-enabled 文件夹中,这是为了加载 mod_includes.so 模块。
这将创建一个指向 mods-available 中的 include.load 的符号链接。
最后重新启动 apache
这使它对我有用,希望你也能让它工作。
--
托马斯
I just fixed this problem myself on ubuntu sever 11.10 with apache2.
my /etc/apache2/sites-available/default file:
I changed AllowOverride None to All in /var/www directory directive.
my .htaccess file in /var/www/.htaccess:
finally i made sure that include.load was in the mods-enabled folder this is to load the mod_includes.so module.
That creates a symbolic link to the include.load in mods-available.
finally restart apache
That made it work for me, hope you get it working as well.
--
Thomas