中国广东省深圳市龙华新区民治街道溪山美地
518131
+86 13113668890
+86 755 29812080
版权声明
转载请与作者联系,转载时请务必标明文章原始出处和作者信息及本声明。

文档出处:
<a href="http://netkiller.github.io/" target="_top">http://netkiller.github.io</a>
<a href="http://netkiller.sourceforge.net/" target="_top">http://netkiller.sourceforge.net</a>
2014-09-17
摘要
我的系列文档
<a href="http://netkiller.github.io/architect/index.html" target="_top">netkiller architect 手札</a>
<a href="http://netkiller.github.io/developer/index.html" target="_top">netkiller developer 手札</a>
<a href="http://netkiller.github.io/php/index.html" target="_top">netkiller php 手札</a>
<a href="http://netkiller.github.io/python/index.html" target="_top">netkiller python 手札</a>
<a href="http://netkiller.github.io/testing/index.html" target="_top">netkiller testing 手札</a>
<a href="http://netkiller.github.io/cryptography/index.html" target="_top">netkiller cryptography 手札</a>
<a href="http://netkiller.github.io/linux/index.html" target="_top">netkiller linux 手札</a>
<a href="http://netkiller.github.io/debian/index.html" target="_top">netkiller debian 手札</a>
<a href="http://netkiller.github.io/centos/index.html" target="_top">netkiller centos 手札</a>
<a href="http://netkiller.github.io/freebsd/index.html" target="_top">netkiller freebsd 手札</a>
<a href="http://netkiller.github.io/shell/index.html" target="_top">netkiller shell 手札</a>
<a href="http://netkiller.github.io/security/index.html" target="_top">netkiller security 手札</a>
<a href="http://netkiller.github.io/www/index.html" target="_top">netkiller web 手札</a>
<a href="http://netkiller.github.io/monitoring/index.html" target="_top">netkiller monitoring 手札</a>
<a href="http://netkiller.github.io/storage/index.html" target="_top">netkiller storage 手札</a>
<a href="http://netkiller.github.io/mail/index.html" target="_top">netkiller mail 手札</a>
<a href="http://netkiller.github.io/docbook/index.html" target="_top">netkiller docbook 手札</a>
<a href="http://netkiller.github.io/version/index.html" target="_top">netkiller version 手札</a>
<a href="http://netkiller.github.io/database/index.html" target="_top">netkiller database 手札</a>
<a href="http://netkiller.github.io/postgresql/index.html" target="_top">netkiller postgresql 手札</a>
<a href="http://netkiller.github.io/mysql/index.html" target="_top">netkiller mysql 手札</a>
<a href="http://netkiller.github.io/nosql/index.html" target="_top">netkiller nosql 手札</a>
<a href="http://netkiller.github.io/ldap/index.html" target="_top">netkiller ldap 手札</a>
<a href="http://netkiller.github.io/network/index.html" target="_top">netkiller network 手札</a>
<a href="http://netkiller.github.io/cisco/index.html" target="_top">netkiller cisco ios 手札</a>
<a href="http://netkiller.github.io/h3c/index.html" target="_top">netkiller h3c 手札</a>
<a href="http://netkiller.github.io/multimedia/index.html" target="_top">netkiller multimedia 手札</a>
<a href="http://netkiller.github.io/perl/index.html" target="_top">netkiller perl 手札</a>
<a href="http://netkiller.github.io/radio/index.html" target="_top">netkiller amateur radio 手札</a>
<a href="http://netkiller.github.io/devops/index.html" target="_top">netkiller devops 手札</a>
目录
<a href="http://netkiller.github.io/journal/ssi.html#what">1. 什么是ssi(server side include)</a>
<a href="http://netkiller.github.io/journal/ssi.html#why">2. 为什么使用ssi</a>
<a href="http://netkiller.github.io/journal/ssi.html#who">3. 谁来负责ssi制作</a>
<a href="http://netkiller.github.io/journal/ssi.html#how">4. 怎么处理ssi包含</a>
<a href="http://netkiller.github.io/journal/ssi.html#idp57522896">4.1. ssi 目录规划</a>
<a href="http://netkiller.github.io/journal/ssi.html#idp57523152">4.2. www.example.com 静态内容服务器</a>
<a href="http://netkiller.github.io/journal/ssi.html#idp57535120">4.3. acc.example.com 动态网页服务器</a>
<a href="http://netkiller.github.io/journal/ssi.html#idp57538368">4.4. ssl卸载服务器</a>
<a href="http://netkiller.github.io/journal/ssi.html#idp57541088">4.5. /www/inc.example.com 公共包含文件</a>
<a href="http://netkiller.github.io/journal/ssi.html#idp57544368">4.6. 引用包含文件实例</a>
ssi是服务器端页面包含,ssi工作在web服务器上,web服务器可以在一个页面中包含另一个页面,在用户端看来是只有一个页面。
我们又很多个子站,所有网站的header与footer都相同,还有一些block区块也存在共用。所以我们将这个共用的部分拆分,然后使用ssi按需包含。
稍有经验的美工人员都可以灵活使用ssi,程序员也可在短时间内学会ssi.
inc.example.com 是ssi共用文件,存放shtml文件。
/www/inc.example.com是公共目录,不需要配置nginx,不能通过浏览器访问到该目录.
由于include作用于web服务器的$document_root目录,例如当前$document_root是/www/example.com/www.example.com
这是服务器限制,如果ssi可能包含$document_root之外的文件,将会带来安全问题,例如
怎样能突破限制呢?我想出了别名,通过别名/include引用/www/example.com/inc.example.com目录中的公文模块,例如:
apache 与 nginx 服务器的 ssi 实现稍有不同include file与include virtual也有差异。
该服务器不对外提供服务器,只允许下面的ssl卸载服务器通过反向代理连接
将ssl证书处理,机密与解密操作转移到该服务器,不让业务服务器处理证书的加密与解密操作,上面的http对内访问,https对外访问,https通过反向代理连接http服务器实现ssl证书卸载
/www/inc.example.com/include/cn/config.html