Apache默认是不支持SSI的,需要我们更改httpd.conf来进行配置。
CentOS中httpd.conf文件位置是 /etc/httpd/conf/httpd.conf,
①打开后搜索“AddType text/html .shtml”,搜索结果:
# AddType text/html .shtml
# AddOutputFilter INCLUDES .shtml
把这两行前面的#去掉。
②然后搜索“Options Indexes FollowSymLinks”
在搜索到的那一行后面添加“ Includes”
即将该行改变为 Options Indexes FollowSymLinks Includes
保存httpd.conf,重起apache即可。
到此我们就完成了对Apache SSI的设置。
这篇博文很不错:
http://www.cnblogs.com/saptechnique/archive/2012/08/28/2660403.html