最近要用到resin的ssl,参考网上的
资料和
官方参考文档。经过多次实践后,终于完成了resin的ssl配置。
要启用resin的SSL功能,只有pro版才支持。普通版配置后会出现诸如没有licence或没有JNI support的警告。
下面介绍主要针对windows的配置:
1.安装resin 下载地址:http://www.caucho.com/
本示例使用的是resin 3.1.3版本,破解版可以看
这个
。
2. 导入ssl dll.
1)安装GnuWin32,完成后拷贝GnuWin32/bin目录下的ssl相关库文件:
C:\> cd %RESIN_HOME%
C:\resin-3.0> copy "C:\Program Files\GnuWin32\bin\libssl32.dll" .\libssl32.dll
C:\resin-3.0> copy "C:\Program Files\GnuWin32\bin\libeay32.dll" .\libeay32.dll
备注:
上面所需dll在resin-pro-3.0.19版本里配置成功。
而resin-pro-3.1.3配置ssl所需要DLL列表:
- ssleay32.dll
- libssl32.dll
- libeay32.dll
第一个在官方网站上没有说明,但是在3.1.3版里如果少了第一个启动时会报错:
com.caucho.config.ConfigException: SSL JNI was not properly initialized.
Make sure the resinssl library is properly created and the SSL libraries
3.在%RESIN_HOME%下建一个 keys 文件夹,%RESIN_HOME%/keys 信件文件openssl.cnf 内容如下
[ req ]
default_bits = 1024
distinguished_name = req_distinguished_name
[ req_distinguished_name ]
C = 2 letter Country Code, for example US
C_default =
ST = State or Province
ST_default =
L = City
L_default =
O = Organization Name
O_default =
OU = Organizational Unit Name, for example 'Marketing'
OU_default =
CN = your domain name, for example www.hogwarts.com
CN_default =
emailAddress = an email address
emailAddress_default =
(PS:在windows下可能新建的这个文件会变成一个快速拨号的快捷方式 不用管它)
4.建立gryffindor.key
"C:\Program Files\GnuWin32\bin\openssl.exe" genrsa -des3 -out gryffindor.key 1024 |
5.建立gryffindor.crt
"C:\Program Files\GnuWin32\bin\openssl.exe" req -config ./openssl.cnf -new -key gryffindor.key -x509 -out gryffindor.crt |
(以刚才我们写的openssl.cnf为模板)
备注:在linux下使用openssl建立密钥和证书更方便,下载openssl包并编译安装,完成直接运行相关命令即可。
6.配置resin.conf,指定SSL端口,本示例使用8443,这个可以自定义。
<http port="8443">
<openssl>
<certificate-file>keys/gryffindor.crt</certificate-file>
<certificate-key-file>keys/gryffindor.key</certificate-key-file>
<password>my-password</password>
</openssl>
</http>
7.测试,访问https://localhost:8443
备注:
如果是要移植到linux 上只需要把libssl32.dll libeay32.dll拷贝到RESIN_HOME下,还有keys文件夹拷过去,resin.conf 不变。
分享到:
相关推荐
为resin3 和eclipse的集成而努力
resin3.0中的https配置
resin-pro-3.1.3配置ssl ssleay32.dll libssl32.dll libeay32.dll 第一个在官方网站上没有说明,但是我试过如果少了第一个启动时会报错: com.caucho.config.ConfigException: SSL JNI was not properly ...
resin服务器配置指南,实现resin服务均衡。前台服务均衡
Windows下Resin的配置与部署(附图).doc
对resin里的主要配置进行了一些解释说明,帮您更好的了解resin,配置resin
Windows下Resin的配置与部署.txtWindows下Resin的配置与部署.txtWindows下Resin的配置与部署.txt
resin详细配置说明,包括resin的安装配置、使用方法等。
windows下resin多个版本的详细配置过程,通过实例详细介绍了resin的配置过程及部署过程
apache2.2整合resin3.14+Eclipse远程调试,文档有详细的配置说明和截图 文档详细说明了apache2.2整合resin3.14的全过程,并且增加了Eclipse远程调试的配置方法。
配置好openssl的resin4配置文件及loaclhost的证书(供测试用)
resin3 resin3下载 resin-3.0.21下载
(3) Resin安装与配置 - 21 - 1) Resin安装 - 21 - 2) Resin配置 - 21 - (4) Linux下Nginx+Resin负载均衡,session问题解决实例 - 21 - 1) 测试环境: - 21 - 2) 安装步骤: - 22 - a)在server1 上安装配置 nginx + ...
Resin.conf配置文件中文说明。 这是本人前期发布的一个资源, 当时不知怎么修改不了资源分, 现在不要资源分了。
Apache + nginx + resin 详细配置
resin4.0配置文档,这是一个英文文档,供分享
最新的resin配置指导,新人少点弯路,下了就知道了 Main class: com.caucho.server.resion.Resin 这里多写了一个o 正确的是: Main class: com.caucho.server.resin.Resin
Resin配置详解,具体的使用等
Resin是CAUCHO公司的产品,是一个非常流行的application server,对servlet和JSP提供了良好的支持,性能也比较优良,resin自身采用JAVA语言开发。