在windows下使用apache + openssl + svn 搭建帶ssl的svn伺服器

來源:互聯網
上載者:User
我前面一篇文章講過如果利用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 就可以了

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.