ITeye博客

如何生成openssl的证书

evaima · 2009-11-25 15:00 · SSL · Markdown

命令行到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>

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。