天天看點

SSL證書解除安裝與SSI進階應用

中國廣東省深圳市龍華新區民治街道溪山美地

518131

+86 13113668890

+86 755 29812080

版權聲明

轉載請與作者聯系,轉載時請務必标明文章原始出處和作者資訊及本聲明。

SSL證書解除安裝與SSI進階應用

文檔出處:

<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

繼續閱讀