[英]Apache SSI not working
I am running an Apache (version 2.2.22) web server on an Ubuntu 12.04 server. 我在Ubuntu 12.04服务器上运行Apache(版本2.2.22)Web服务器。 SSI is not working.
SSI不起作用。 The classic
<!--#echo var="DATE_LOCAL" -->
in an index.shtml page is not interpreted. 不解释index.shtml页面中的经典
<!--#echo var="DATE_LOCAL" -->
。 In /etc/apache2/httpd.conf I have put: 在/etc/apache2/httpd.conf我放了:
Options +Includes
AddType text/html .shtml
AddHandler server-parsed .shtml
AddOutputFilter INCLUDES .shtml
and in /etc/apache2/sites-available/default : 在/ 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>
moreover, the error.log gives me: 而且, 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
Thanks in advance for any help :) 在此先感谢任何帮助:)
I found the problem: I simply had to load the include
module. 我发现了问题:我只需要加载
include
模块。 In practice I only had to a2enmod include
and it fixed the problem. 在实践中我只需要
a2enmod include
它就可以解决问题。
Sorry for the stupid question. 抱歉这个愚蠢的问题。 I leave it for those who could spend a whole day looking for such an evident thing, like me...
我留给那些可以花一整天寻找这样一个明显的东西的人,比如我......
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.