根据选择的SSL工作模式不同所需证书格式有所区别
OpenSSL模式:证书颁发邮件中的服务器证书,中间证书及私钥文件key。共三个文件。本参考文档中将服务器证书保存为server.cer文件,中间证书保存为chain.crt,私钥保存为server.key。
JSSE模式:需准备JKS格式证书,格式转换参考:https://www.yuque.com/sheca/kfxgzb/tyb1xg https://www.yuque.com/sheca/kfxgzb/xsu96m
打开resin.xml文件添加以下配置
<resin xmlns="http://caucho.com/ns/resin">
<cluster id="http-tier">
<server id="a" address="192.168.1.2">
<http port="443">
<openssl>
<certificate-file>keys/server.cer</certificate-file>
<certificate-key-file>keys/server.key</certificate-key-file>
<certificate-chain-file>keys/chain.crt</certificate-chain-file>
<password>my-password</password>
<!-- disables SSLv3 -->
<protocol>-sslv3</protocol>
</openssl>
</http>
</server>
...
</resin>
或者打开resin.properties文件配置修改
app.http : 8080
app.https : 8443
web.http : 8080
web.https : 8443
设置端口(根据实际需求设置)
# OpenSSL certificate configuration
openssl_file : key/server.cer
openssl_key : keys/server.key
openssl_chain_file : keys/chain.crt
#openssl_password : changeme
openssl_protocol : -sslv2 -sslv3
openssl_cipher_suite :
打开resin.xml文件添加以下配置
<resin xmlns="http://caucho.com/ns/resin">
<cluster id="">
<server-default>
<http port="8443">
<jsse-ssl>
<key-store-type>jks</key-store-type>
<key-store-file>keys/server.keystore</key-store-file>
<password>changeit</password>
<!-- set enabled protocols -->
<protocol>tlsv1 tls1.1 tls1.2</protocol>
</jsse-ssl>
</http>
</server-default>
...
</cluster>
</resin>
或者打开resin.properties文件配置修改(删除字段前的#)
app.http : 8080
app.https : 8443
web.http : 8080
web.https : 8443
设置端口(根据实际需求设置)
jsse_keystore_type : jks
jsse_keystore_file : /etc/resin/keys/server.keystore
jsse_keystore_password : changeme
配置完成之后重启resin
resin4官方文档:https://caucho.com/resin-4.0/admin/security-ssl.xtp