linux下resin的https配置

2 篇文章 0 订阅
对于resin官方版本对接openssl有个坑;把我差点坑死了;
注意:[color=red]resin版本对于openssl只有pro版本支持;我下载了两个非pro版本都不可用;[/color]
实现步骤:
1.安装openssl:
cd /usr/local
yum install openssl openssl-devel -y

2.生成ssl的crt,key文件
openssl genrsa -des3 -out test.key 1024
openssl req -new -key test.key -x509 -out test.crt
openssl req -new -key test.key -out test.csr

注意:可以参考[url]http://www.linuxidc.com/Linux/2013-08/88271.htm[/url] 博客
也可以参考[url]http://www.willrey.com/support/ssl_resin.html[/url]
2.解压你的resin包(官网:http://caucho.com/products/resin/download/archive)
cd /usr/local
tar -zxvf resin-pro-4.0.49.tar.gz

3.执行配置文件configure (执行目录 /usr/local/resin-pro-4.0.49)
./configure --prefix=/usr/local/resin-pro-4.0.49 --enable-64bit --enable-ssl --with-openssl=/usr/

注意:官方的执行 缺少了prefix=/usr/local/resin-pro-4.0.49 目录会执行失败;
如果指定java-home:可以追加
--with-java-home=/usr/local/resin-4.0.44/jdk1.7.0_79/ 

4.然后执行 make命令;
cd /usr/local/resin-pro-4.0.49
make
make install

5.修改配置文件:
a.修改resin.xml文件

<http port="443">
<openssl>
<certificate-key-file>keys/your_domain.key</certificate-key-file>
<certificate-file>keys/your_domain.crt</certificate-file>
<certificate-chain-file>keys/chain.txt</certificate-chain-file>
<password>test123</password>
<protocol>-sslv3</protocol>
</openssl>
</http>

b.或者修改resin.perportis(前提:resin.xml文件不修改)

# OpenSSL certificate configuration
# Keys are typically stored in the resin configuration directory.
# openssl_file : keys/test.crt
# openssl_key : keys/test.key
# openssl_password : changeme
# openssl_protocols : -sslv2 -sslv3
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值