2012年3月14日 星期三

SSL Proxy: Stunnel 設定

一般來說,要在web server 支援ssl,有兩種方法

1) use model-Description: Misspelled Wordssl to enable https with Apache server

2) Use https proxy server: such as Description: Misspelled Wordstunnel

這邊介紹的是使用Stunnel 這種https proxy的使用方法

1. Download Description: Misspelled Wordstunnel package

http://www.stunnel.org/download/source.html

2. unzip and install Description: Misspelled Wordstunnel

// this need c compile, if your environment has no Description: Misspelled Wordgcc compile, please install it first

//if you encountered some error that claimed no Description: Misspelled Wordopenssl.h, please upgrade your Description: Misspelled Wordopenssl

//module to the latest

#tar Description: Misspelled Wordzxvf stunnel-#.##.tar.gz

#cd /Description: Misspelled Wordstunnel-#.##

#./configure

#./make & make install

3. set up Description: Misspelled WordstunnelDescription: Misspelled Wordconfig

#cd /Description: Misspelled Wordusr/local/Description: Misspelled Wordetc/Description: Misspelled Wordstunnel

// duplicate Description: Misspelled Wordstunnel.conf from sample configuration file

#Description: Misspelled WordcpDescription: Misspelled Wordstunnel.conf-sample Description: Misspelled Wordstunnel.conf

//modify the Description: Misspelled Wordstunnel configuration

//The minimal setting should include 2 parts:  cert and [https] section

//please unmark the below settings

#######################

;cert=/Description: Misspelled Wordusr/local/Description: Misspelled Wordetc/Description: Misspelled Wordstunnel/Description: Misspelled Wordstunnel.pem

;[https]

;accept = x.x.x.x:443

;connect =x.x.x.x:80

######################

4.generate self-sign certificate

//if it claims that error, you can try to give absolutely path of Description: Misspelled Wordopenssl.cnf

#Description: Misspelled WordopensslDescription: Misspelled Wordreq -new -x509 -days 365 -nodes -Description: Misspelled WordconfigDescription: Misspelled Wordopenssl.cnf -out Description: Misspelled Wordstunnel.pem -Description: Misspelled WordkeyoutDescription: Misspelled Wordstunnel.pem

5.start Description: Misspelled Wordstunnel with configuration

#Description: Misspelled WordstunnelDescription: Misspelled Wordstunnel.conf

沒有留言:

如何下載Facebook 相簿跟影片

影片:透過chrome plug-in : Video Downloader for Facebook<sup>TM</sup> 相簿: 透過chrome plug-in : Tampermonkey 搭配script : Facebo...