我正在Ubuntu12.04服务器上运行Apache (Version2.2.22) web服务器。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/site中-可用/默认:
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(谢谢您的帮助:)
发布于 2014-05-07 16:06:17
我发现了问题:我只需加载include模块。在实践中,我只需要a2enmod include,它就解决了问题。
对这个愚蠢的问题很抱歉。我把它留给那些可以花一整天寻找如此明显的东西的人,就像我.
https://stackoverflow.com/questions/23517165
复制相似问题