六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 85|回复: 0

如何生成openssl的证书

[复制链接]

升级  38%

3

主题

3

主题

3

主题

童生

Rank: 1

积分
19
 楼主| 发表于 2013-2-7 00:20:26 | 显示全部楼层 |阅读模式
命令行到apache(含有openssl) 的bin文件夹下,执行下面的命令:
openssl req -config c:/apache/conf/openssl.cnf -new -out ../conf/ssls/xxx/server.csr
openssl rsa -in privkey.pem -out ../conf/ssls/xxx/server.key,
用server.csr去能申请证书的网站使用,获得证书后,在apache中做如下设置:
 
<VirtualHost 127.0.0.1:443>
    JkMount /* xxxx
    ServerAdmin webmaster@dummy-host.example.com
    ServerName xxxxx
    SSLEngine on
    SSLCertificateFile conf/ssls/xxxx/server.cer
    SSLCertificateKeyFile conf/ssls/xxxx/server.key
    SSLVerifyClient none
    SSLVerifyDepth 1
    DocumentRoot "c:/work/server/xxxx/webapps"
    ErrorLog logs/error.log
    DirectoryIndex index.html index.jsp index.php
    <Directory "c:/work/server/xxxxx/webapps">
    Options Includes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
    </Directory>
</VirtualHost>
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表