gpt4 book ai didi

linux - Apache SSI 不工作

转载 作者:太空狗 更新时间:2023-10-29 11:25:13 25 4
gpt4 key购买 nike

我在 Ubuntu 12.04 服务器上运行 Apache(版本 2.2.22)网络服务器。 SSI 不工作。经典<!--#echo var="DATE_LOCAL" -->index.shtml 页面中不被解释。在 /etc/apache2/httpd.conf 我放了:

Options +Includes 
AddType text/html .shtml
AddHandler server-parsed .shtml
AddOutputFilter INCLUDES .shtml

/etc/apache2/sites-available/default 中:

    DocumentRoot /var/www
<Directory />
Options Indexes FollowSymLinks MultiViews +ExecCGI +Includes
AllowOverride All
AddHandler cgi-script .cgi .pl .py
Order allow,deny
allow from all
</Directory>

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

<IfModule mod_dir.c>
DirectoryIndex index.shtml index.html index.php
</IfModule>

此外,error.log 给我:

[Wed May 07 13:51:23 2014] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.11 with Suhosin-Patch configured -- resuming normal operations
[Wed May 07 13:51:26 2014] [error] an unknown filter was not added: includes
[Wed May 07 13:51:27 2014] [error] an unknown filter was not added: includes

在此先感谢您的帮助:)

最佳答案

我发现了问题:我只需要加载 include 模块。实际上,我只需要 a2enmod include 就可以解决问题。

抱歉这个愚蠢的问题。我把它留给那些可以花一整天时间寻找如此明显的东西的人,比如我......

关于linux - Apache SSI 不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23517165/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com