linux - Apache SSI 不工作

标签 linux apache apache2 ubuntu-12.04 ssi

我在 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/

相关文章:

linux - 将目录更改为尾部结果路径的 shell 脚本

linux - 新安装的 apache 将 html 内容作为文本提供

Apache 多个虚拟主机在同一个 ip(不同的 url)

css - apache 服务器上的 django 管理 css

linux - 无法连接到我可以 ping 通的计算机

linux - 如何编译 Intel x86 汇编代码以获取十六进制转储?

linux - 如何从 systemd 配置文件中的函数输出设置 ExecStart?

Apache 上的 Django - 防止 504 网关超时

apache httpd 启动时出现 Java 问题

PHP线程编译不工作