现在的位置: 首页 > 综合 > 正文

在windows下使用apache + openssl + svn 搭建带ssl的svn服务器

2012年06月24日 ⁄ 综合 ⁄ 共 993字 ⁄ 字号 评论关闭
我前面一篇文章讲过如果利用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 就可以了

抱歉!评论已关闭.