HTTP转HTTPS操作步骤(EOS开发平台)
moblie版本是:Mobile_Platform_7.2_Develop_Edition-x86_64bit
PrimetonMobile版本用本目录下的
1.参照本地手动生成tomcat.cer和tomcat.keystore两个文件
2.将tomcat.cer和tomcat.keystore两个文件放置eos安装路径的tomcat目录下
3.修改eos安装路径(D:\primeton\platform\apache-tomcat-7.0.54\conf\server.xml)文件的相关配置
3.1将<Connector URIEncoding="UTF-8" connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>
变更为
<Connector URIEncoding="UTF-8" connectionTimeout="20000" port="80" protocol="HTTP/1.1" redirectPort="443"/>
3.2将注释掉的代码
<!--
<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" />
-->
变更为
<Connector port="443" protocol="org.apache.coyote.http11.Http11Protocol" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="D:\primeton\platform\apache-tomcat-7.0.54\tomcat.keystore"
keystorePass="tomcat"
ciphers="TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
TLS_ECDHE_RSA_WITH_RC4_128_SHA,
TLS_RSA_WITH_AES_128_CBC_SHA256,
TLS_RSA_WITH_AES_128_CBC_SHA,
TLS_RSA_WITH_AES_256_CBC_SHA256,
TLS_RSA_WITH_AES_256_CBC_SHA,
SSL_RSA_WITH_RC4_128_SHA"/>
3.3将<Connector URIEncoding="UTF-8" port="8009" protocol="AJP/1.3" redirectPort="8443"/>
变更为
<Connector URIEncoding="UTF-8" port="8009" protocol="AJP/1.3" redirectPort="443"/>
4.EOS安装路径中D:\primeton\platform\apps_config\offerapp\config\user-config.xml文件修改配置
<group name="Http-Security">
<configValue key="isOpenSecurity">false</configValue>
<configValue key="isAllInHttps">false</configValue>
<!-- tomcat default config
<configValue key="host">localhost</configValue>
<configValue key="http-port">8080</configValue>
<configValue key="https-port">8443</configValue>
-->
<configValue key="Exclude">**/common.download,**/saveForm.jsp,**/saveDataset.jsp</configValue>
<configValue key="regexs">eval\s*?\([^\)]+?\),alert\s*?\([^\)]+?\),new\s+?Function\s*?\([^\)]+?\),window\[[^\]]+?\]\s*?=</configValue>
</group>
变更为
<group name="Http-Security">
<configValue key="isOpenSecurity">true</configValue>
<configValue key="isAllInHttps">false</configValue>
<!-- tomcat default config-->
<configValue key="host">localhost</configValue>
<configValue key="http-port">80</configValue>
<configValue key="https-port">443</configValue>
<configValue key="Exclude">**/common.download,**/saveForm.jsp,**/saveDataset.jsp</configValue>
<configValue key="regexs">eval\s*?\([^\)]+?\),alert\s*?\([^\)]+?\),new\s+?Function\s*?\([^\)]+?\),window\[[^\]]+?\]\s*?=</configValue>
</group>
5.eos安装路径下D:\primeton\platform\apache-tomcat-7.0.54\conf\web.xml文件修改如下配置
</welcome-file-list>后追加如下配置
<login-config>
<!-- Authorization setting for SSL -->
<auth-method>CLIENT-CERT</auth-method>
<realm-name>Client Cert Users-only Area</realm-name>
</login-config>
<security-constraint>
<!-- Authorization setting for SSL -->
<web-resource-collection >
<web-resource-name >SSL</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
6.重启服务器