nginx 解析不了 include ,因为未开启SSI
来源:互联网 发布:淘宝第三方资金平台 编辑:程序博客网 时间:2024/04/27 03:50
什么是SSI
SSI 是 Server Side Include 的首字母缩略词,是一种基于服务端的网页制作技术。通过一个非常简单的语句即可调用包含文件,页面传送给浏览器之前,服务器会对页面所包含的文件放回页面中去。
SSI 默认情况下是不开启的,需要用户自己开启。开启所需要的三个参数:ssi,ssi_silent_errors和ssi_types
ssi on; //开启ssi支持,默认是offssi_silent_errors on; //默认值是off,开启后在处理SSI文件出错时不输出错误提示:"[an error occurred while processing the directive]"ssi_types text/shtml; //默认是ssi_types text/html,支持htm和html页面,如果需要shtml支持,则需要设置为:ssi_types text/shtml
我把配置放到 location 作用域下:
那么我在 html 页面就可以使用 include 了,如这样引入头部:
<!--#include file="header.html"-->
【参考】
http://blog.csdn.net/qmhball/article/details/8778201
http://www.apelearn.com/bbs/thread-5281-1-1.html
http://www.k68.org/?p=1361
0 0
- nginx 解析不了 include ,因为未开启SSI
- 为Nginx开启SSI模块以支持SHTML及include文件引入
- 用shtml来include网页文件(开启SSI)
- shtml页面include网页文件Apache开启SSI配置
- Apache下开启SSI配置使shtml支持include包含
- Apache下开启SSI配置使shtml支持include包含
- Apache下开启SSI配置,使html支持include包含
- nginx让指定站点支持SSI(Server side include)
- SSI(Server Side Include)
- ssi include 用法
- tomcat7开启SSI功能
- Tomcat7开启SSI功能
- Tomcat7开启SSI功能
- 关于nginx解析不了php的问题
- nginx-rtmp开启ssi功能页面无法加载css的解决方法
- 【Docker】之 nginx开启 但页面访问不了
- ssi include 命令 路径问题
- Server Side Include( SSI )学习
- JAVA多线程实现的三种方式
- Linux内存描述之概述--Linux内存管理(一)
- swift代码之路(二)
- STS工具离线安装velocity插件
- java JDK环境变量设置
- nginx 解析不了 include ,因为未开启SSI
- Android自定义dialog并实现失去焦点,activity获取焦点的功能
- Git reset and revert
- 正则表达式
- 分布式环境Ajax的跨域请求
- 关于Web报表FineReport打印的开发应用案例
- 了解一个React组件
- Ionic基础——介绍及开发准备
- MyEclipse优化