Resin HTTPS 安装指南
请使用resin
的 2.x 版本,因为resin 3.x
只有 professional
版本才支持 HTTPS
。 1.
安装 openssl:
# tar –zxvf openssl-xxx.tar.gz
# ./config –prefix=/usr/local/openssl shared
# mv resin-<version>.tar.gz /usr/local/src
# tar –zxvf resin-<version>.tar.gz
–prefix=/usr/local/resin-<version> \
–with-openssl=/usr/local/openssl
# ln –s resin-<version> resin
3.
建立存放private key
和 certificate
的目录 #export RESIN_HOME=/usr/local/resin 4.
生成private key
和 certificate
# export PATH=/usr/local/openssl/bin:$PATH
# openssl genrsa –des3 –out test.key 1024
请按提示输入private key
的 passphrase(
假设为mykey)
# openssl req –new –key test.key -x 509 –out test.crt
当提示输入 private key
的 passprase
的时候,输入mykey;
请按提示输入 country, province, city, organization, distinct name(
本机的 FQDN) and email address.
# openssl req -new -key test.key -out cert.csr 然后 拿着这个文件去数字证书颁发机构(即CA)申请一个数字证书。 <certificate-file>keys/test.crt</certificate-file> <certificate-key-file>keys/test.key</certificate-key-file> <key-store-password>mykey</key-store-password> 6.
删除stderr.log
和stdout.log,
启动resin
1.
查看stdderr.log,
确定没有错误提示, 查看 stdout.log,
确定HTTPS
在443
端口上监听. 2. #openssl s_client –host <
本机的FQDN> -port 443
如果HTTPS
在正常运作,
我们应该可以看到SSL
的协商信息.
3.
在浏览器中使用HTTPS
协议访问我们的HTTPS
站点,
如果HTTPS
在正常运作,
我们 该可以看到一个窗口,
提示我们说我们的HTTPS
站点的 certificate
有问题 (
当然,如果使用 的是商业证书,不会提示有问题),
点击”
是”
或”yes”,
就可以看到 注:FQDN,
全限定域名,形如 [url]www.cisco.com[/url]
本文转自zkjian517 51CTO博客,原文链接:http://blog.51cto.com/zoukejian/57021