普元 EOS Platform 7.6 如何配置tomcat证书,使用https访问应用
原文链接
【解答】
以本地EOS Platform 7.6 开发版为例,操作步骤如下:
1、生成tomcat证书:
打开cmd窗口—>打开jdk的bin目录:E:\Primeton\EOSPLATFORM\PL760911\ide\eclipse\jre\bin,使用keytool为Tomcat生成证书,命令如下:
keytool -genkey -v -alias tomcat -keyalg RSA -keystore E:\Primeton\EOSPLATFORM\PL760911\apache-tomcat-7.0.54\tomcat.keystore -validity 36500
配置如下图:
keystore密码:123456,tomcat的主密码和keystore密码相同
按回车后,在E:\Primeton\EOSPLATFORM\PL760911\apache-tomcat-7.0.54下生成了tomcat.keystore
2、配置https协议:
在E:\Primeton\EOSPLATFORM\PL760911\apache-tomcat-7.0.54\conf\server.xml中添加如下配置,并重启server
<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" keystoreFile="E:\Primeton\EOSPLATFORM\PL760911\apache-tomcat-7.0.54\tomcat.keystore" keystorePass="123456" sslProtocol="TLS" />
3、效果验证:
访问https://127.0.0.1:8443/default,出现coframe登录界面: