ssl 在 tomcat 6 上给出 ssl_error_rx_record_too_long 错误jsf 2.0
我使用了3个简单步骤 在 Tomcat 6 上设置 SSL 的教程。我一步一步完成了。我什至将
更改为与教程中的相同。不幸的是,重新启动 Tomcat 并运行项目后,我遇到了 ssl_error_rx_record_too_long 错误,
这就是我所做的:
- 在 java bin 文件夹中运行命令
keytool -genkey -alias techtracer -keypass ttadmin -keystore techtracer.bin -storepass ttadmin
- 回答问题
- 将techtracer.bin文件复制到tomcats webapps目录中
- 修改tomcats conf/server.xml文件如下
`
<Connector port=”8443″
maxThreads=”150″ minSpareThreads=”25″ maxSpareThreads=”75″
enableLookups=”true” disableUploadTimeout=”true”
acceptCount=”100″ debug=”0″ scheme=”https” secure=”true”
clientAuth=”false” sslProtocol=”TLS”
keystoreFile=”../webapps/techtracer.bin”
keystorePass=”ttadmin” />
` 5.修改jsf应用程序中的web.xml文件,如下
添加此代码:
<security-constraint>
<web-resource-collection>
<web-resource-name>securedapp</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
另外输入 https://localhost:8443/ 在浏览器结果中,结果为“加载页面时连接被终止”。我不知道是什么原因导致这个问题。请告诉我正确的方向。提前谢谢
已解决:
- 在java bin文件夹中运行命令
keytool -genkey -alias tomcat -keyalg RSA
- 回答问题
- 修改tomcats conf/server.xml文件如下
`
<Connector
protocol="org.apache.coyote.http11.Http11Protocol"
port="8443" maxThreads="200"
scheme="https" secure="true" SSLEnabled="true"
keystoreFile="C:/Users/Szajba/.keystore" keystorePass="changeit"
clientAuth="false" sslProtocol="TLS"/>
` 5.修改jsf应用程序中的web.xml文件,如下
添加此代码:
<security-constraint>
<web-resource-collection>
<web-resource-name>securedapp</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
对我来说工作正常。记得修改密码
I used this 3 easy steps tutorial to setup SSL on Tomcat 6. I did it step by step. I've even changed the <connector>
to be the same as in the tutorial. Unfortunately after restarting Tomcat and running the project i had ssl_error_rx_record_too_long error
here is what I did:
- Run command
keytool -genkey -alias techtracer -keypass ttadmin -keystore techtracer.bin -storepass ttadmin
in java bin folder - answer questions
- copy the techtracer.bin file into tomcats webapps directory
- modify tomcats conf/server.xml file as follows
`
<Connector port=”8443″
maxThreads=”150″ minSpareThreads=”25″ maxSpareThreads=”75″
enableLookups=”true” disableUploadTimeout=”true”
acceptCount=”100″ debug=”0″ scheme=”https” secure=”true”
clientAuth=”false” sslProtocol=”TLS”
keystoreFile=”../webapps/techtracer.bin”
keystorePass=”ttadmin” />
`
5.modify web.xml file in jsf app as follows
add this code:
<security-constraint>
<web-resource-collection>
<web-resource-name>securedapp</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
in addition typing https://localhost:8443/ in the browser results with outcome "The connection was terminated while the page was loading". I don't know what causes this problem. Please show me the right direction. Thank You in advance
Resolved:
- Run command
keytool -genkey -alias tomcat -keyalg RSA
in java bin folder - answer questions
- modify tomcats conf/server.xml file as follows
`
<Connector
protocol="org.apache.coyote.http11.Http11Protocol"
port="8443" maxThreads="200"
scheme="https" secure="true" SSLEnabled="true"
keystoreFile="C:/Users/Szajba/.keystore" keystorePass="changeit"
clientAuth="false" sslProtocol="TLS"/>
`
5.modify web.xml file in jsf app as follows
add this code:
<security-constraint>
<web-resource-collection>
<web-resource-name>securedapp</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
Works fine for me. Remember to change the password
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论