如何使你的Apache服务器支持SSI

Apache默认是不支持SSI的,需要我们更改httpd.conf来进行配置。我这里以windows平台的Apache 2.0.x为例,打开conf目录下的httpd.conf文件,搜索“AddType text/html .shtml”,搜索结果: 
 
# AddType text/html .shtml 
# AddOutputFilter INCLUDES .shtml 
 
把这两行前面的#去掉,修改下面两行:
 
AddType text/html .html 
AddOutputFilter INCLUDES .html .php
 
然后搜索“Options Indexes FollowSymLinks” 
在搜索到的那一行后面添加“ Includes” 
即将该行改变为 Options Indexes FollowSymLinks Includes
保存httpd.conf,重起apache即可。 
到此我们就完成了对Apache SSI的设置。
注意:INCLUDES 后面是ssi文件的后缀名。。 请根据自己的情况设置。
posted @ 2011-03-02 17:13  浪淘沙(Jeff.Liu)  阅读(224)  评论(0编辑  收藏  举报