linux下resin的https配置
对于resin官方版本对接openssl有个坑;把我差点坑死了;
注意:resin版本对于openssl只有pro版本支持;我下载了两个非pro版本都不可用;
实现步骤:
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
注意:可以参考http://www.linuxidc.com/Linux/2013-08/88271.htm博客
也可以参考http://www.willrey.com/support/ssl_resin.html
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
相关推荐
寒星孤照 2011-03-04
香帅 2010-09-09
liangkaiping0 2010-12-28
wozijisunfly 2010-10-28
liufangbaishi0 2012-05-07
wujiangping 2011-11-17
mohanzb 2011-02-12
文艺小猿人 2010-08-05
mygirlgod 2014-04-09
togeth 2013-11-19
fenghuoliuxing0 2012-12-24
81901836 2012-11-26
MingCHEN 2012-07-28
httpp 2011-09-20
liben00 2010-11-09
loveyy 2007-07-12