我前面一篇文章講過如果利用apache架設svn伺服器, 這次介紹如何加入ssl功能,增強伺服器的安全性.svn的相關配置就不多說了,可以參見在Windows XP用Apache和Subversion建立開發環境
流水帳如下: 若有問題 可以留言
在http://hunter.campbus.com/下載Apache_2.0.59-Openssl_0.9.8d-Win32.zip
在apache的bin目錄下運行如下命令
openssl req -config openssl.cnf -new -out my-server.csr
建立簽名和私密金鑰
注意"Common Name (eg, your websites domain name)" 輸入的內容需要和apache的設定的servername一致 比如ip地址
openssl rsa -in privkey.pem -out my-server.key
要刪除產生的.rnd檔案 否認會很容易破解私密金鑰
openssl x509 -in my-server.csr -out my-server.cert -req -signkey my-server.key -days 365
如果是IE 則
openssl x509 -in my-server.cert -out my-server.crt -outform DER
將my-server.key and my-server.crt放到 Apache目錄的/conf/ssl下
將apache conf 下的httpd.conf 中的LoadModule ssl_module modules/mod_ssl.so注釋去掉
配置conf下的ssl.conf檔案
找到重新賦值
SSLCertificateFile conf/ssl/my-server.crt
SSLCertificateKeyFile conf/ssl/my-server.key
注釋掉
# General setup for the virtual host
下面的
#DocumentRoot "c:/apache/htdocs"
#ServerName www.example.com:443
#ServerAdmin you@example.com
#ErrorLog logs/error_log
#TransferLog logs/access_log
結束apache monitor和apache進程 並重啟 輸入https://servername 就可以了