SSL 启用问题:Windows 7 中的 Tomcat

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5165497/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 16:19:00  来源:igfitidea点击:

SSL Enabling Problem: Tomcat in Windows 7

windowswindows-7ssl

提问by Kris

I downloaded Tomcat 7.08 Windows Service Installer and installed it. I edited the server.xml to enable https connector port @ 8443 I already created the certificate and key pair using the keytool.

我下载了Tomcat 7.08 Windows Service Installer 并安装了它。我编辑了 server.xml 以启用 https 连接器端口 @ 8443 我已经使用 keytool 创建了证书和密钥对。

keytool -genkey -alias techtracer -keypass ttadmin -keystore techtracer.bin -storepass ttadmin

keytool -genkey -alias techtracer -keypass ttadmin -keystore techtracer.bin -storepass ttadmin

i started the server then, and tried https://localhost:8443/but it was not showing anything. Firefox had shown "connected to localhost..." and nothing more. I cant load any pages in https.

然后我启动了服务器,并尝试了https://localhost:8443/但它没有显示任何内容。Firefox 显示“已连接到本地主机...”,仅此而已。我无法在 https 中加载任何页面。

My System: Windows 7 64-bits / 4GB RAM /JDK_JRE 6/ Tomcat 7.08/ Firefox 3.6

我的系统:Windows 7 64-bits / 4GB RAM /JDK_JRE 6/ Tomcat 7.08/ Firefox 3.6

Can Any one tell me what is the problem with the SSL in my system.?.Any way to fix this? Thanks

任何人都可以告诉我系统中的 SSL 有什么问题。?有什么办法可以解决这个问题?谢谢

Mr.k

先生

回答by Vadim Pluzhinsky

Solution: Update the server.xmlfile as follows:

解决方法:更新server.xml文件如下:

<Connector port="8443" 
protocol="org.apache.coyote.http11.Http11Protocol"
SSLEnabled="true"               
maxThreads="150" scheme="https" secure="true" 
keystoreFile="C:\Program Files\Java\jdk1.6.0_25\keystore\.keystore"
keystorePass="changeit"
clientAuth="false" 
sslProtocol="TLS" />

Please note that I changed the protocol from "HTTP/1.1"to "org.apache.coyote.http11.Http11Protocol"This should fix the problem.

请注意,我将协议从 更改"HTTP/1.1""org.apache.coyote.http11.Http11Protocol"这应该可以解决问题。

回答by Dimitris

Same system, same configuration, same problem but with Tomcat 6. My solution was to switch to 32bit version of Tomcat. I think this is an issue related to 64bit distributions.

相同的系统,相同的配置,相同的问题,但使用 Tomcat 6。我的解决方案是切换到 32 位版本的 Tomcat。我认为这是与 64 位发行版相关的问题。

回答by OhadR

seems like you have to configure your TOMCAT to work with SSL (in addition to all the things that are written above)

似乎您必须配置您的 TOMCAT 才能使用 SSL(除了上面写的所有内容)

have a look here. In addition, you might need to make another change in your settings.xml (tomcat configuration) and delete the line that refers to the APR listener.

看看这里。此外,您可能需要在 settings.xml(tomcat 配置)中进行另一次更改并删除引用 APR 侦听器的行。

Hope this helps...

希望这可以帮助...

Ohad

奥哈德