1.找到apache的配置文件httpd.conf
①找到,LoadModule ssl_module modules/mod_ssl.so,将前面的注释(#)去掉
②找到类似这两行
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
改成
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml .html .htm .php
开启对于.shtml .html .htm .php文件的ssi,注意:只改下面的AddOutputFilter,不要改上面的AddType!
③找到:
Options +Indexes +FollowSymLinks +ExecCGI
在后面添加INCLUDES,如下面所示:
Options +Indexes +FollowSymLinks +ExecCGI +INCLUDES
2.重启apache
即可。