简体   繁体   English

Tomcat 6.0上的SSL

[英]SSL on Tomcat 6.0

I've been trying all day to set Tomcat 6.0 up for SSL. 我一直在努力将Tomcat 6.0设置为SSL。 I know it shouldn't be that hard. 我知道它不应该那么难。 I've followed the Tomcat documentation in creating my own Certificate, configuring the connectors in the server.xml file. 我已经按照Tomcat文档创建了自己的证书,在server.xml文件中配置了连接器。

When I go to https://localhost:8443 , (8443 is the port I defined in the connector) my certificate does not render on the screen, and my browser tells me that it was unable to make a secure connection to the server and that my client may not have the certificate. 当我转到https:// localhost:8443 ,(8443是我在连接器中定义的端口)时,我的证书无法在屏幕上呈现,我的浏览器告诉我它无法与服务器建立安全连接,我的客户可能没有证书。

My question is, why isn't my certificate rendering for the user to say "Trust" or "Not"? 我的问题是,为什么我的证书不会呈现给用户说“信任”或“不”?

There's a full documentation on SSL Howto for Tomcat 6. I don't know how far you've gone to setting up your SSL for me to help you. 有一个关于Tomcat 6的SSL Howto的完整文档。我不知道你为我设置SSL有多大帮助。

Make sure that in server.xml in APACHE_HOME/conf has both Connector for port 8080 and 8443 enabled. 确保在APACHE_HOME/conf server.xml中同时启用了端口8080和8443的Connector

Do you happen to have a tcnative-1.dll file in apache-tomcat-6.xxx\\bin\\ folder? 你碰巧在apache-tomcat-6.xxx\\bin\\文件夹中有一个tcnative-1.dll文件吗?

If so, it will not work with your current <Connector/> configuration. 如果是这样,它将不适用于您当前的<Connector/>配置。 Remove the file or rename the extension and restart the tomcat server again. 删除文件或重命名扩展,然后重新启动tomcat服务器。

This is stated in "Edit the Tomcat Configuration File" section of http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html 这在http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html的 “编辑Tomcat配置文件”部分中说明。

I ended up figuring it out. 我最终搞清楚了。

The issue was regarding to my protocol variable in my Connector: 问题是关于我的连接器中的协议变量:

This is what I had: protocol="HTTP/1.1" 这就是我所拥有的:protocol =“HTTP / 1.1”

Now I have this: protocol="org.apache.coyote.http11.Http11Protocol" 现在我有这个:protocol =“org.apache.coyote.http11.Http11Protocol”

The only issue now is that chrome or IE won't run the site as HTTPS because i signed the certificate myself and am not a CA. 现在唯一的问题是chrome或IE不会以HTTPS身份运行网站,因为我自己签署了证书而不是CA.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM