首页  :: 新随笔  :: 管理

apache使用ssl数字证书

Posted on 2015-11-09 22:02  季枫  阅读(515)  评论(0)    收藏  举报

apache配置:

<VirtualHost *:443>
    ServerName web.p2
.com
    ProxyPreserveHost On
    ProxyRequests Off
	
	SSLEngine on
	SSLCertificateFile "C:/Apache24/server.cer"
	SSLCertificateKeyFile "C:/Apache24/server.key"
	
	RewriteEngine On
	RewriteRule ^/$ /P2P/index.html [R]

    ProxyPass / http://127.0.0.1:8080/
    ProxyPassReverse / http://127.0.0.1:8080/

    ErrorLog logs/ssl.web.p2p.com_error_log
    CustomLog logs/ssl.web.p2
.com_access_log common
</VirtualHost>

  Win32平台不支持加密密钥,所以server.key不能有密码:

解密 openssl rsa -in server.key.org -out server.key

遇到一下错误则需要解密:

Apache2.4配置SSL后启动报错:AH02577: Init: SSLPassPhraseDialog builtin is not supported on Win32 (key file C:/Apache24/conf/server.key)

智读 | 成都会领科技有限公司官网 | 智读App下载 | 每天听本书的博客 | |