Tomcat SSL 配置

编程入门 行业动态 更新时间:2024-10-08 04:29:57
本文介绍了Tomcat SSL 配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我收到了用于 Tomcat 6.0 服务器的 SSL 证书,可以使用了.

I received a SSL cert to use for a Tomcat 6.0 server, ready to use.

我将 Tomcat 配置为在 server.xml 中使用以下内容:

I configured Tomcat to use it with the following in server.xml:

<Connector 
    port="8443" maxThreads="200"
    scheme="https" secure="true" SSLEnabled="true"
    keystoreFile="C:\Tomcat 6.0\ssl\cert" keystorePass="*****"
    clientAuth="false" sslProtocol="TLS"/>

我使用命令提示符启动了 Tomcat,这样我就可以看到发生的任何错误消息.没有.

I started Tomcat using the command prompt so I could see any error message as they happened. There were none.

访问不同网址的结果:

http://localhost -> 正常页面加载正常https://localhost -> 无法找到浏览器声明页面https://localhost:8443 -> 无法找到页面http://localhost:8443 -> 在接受重定向到 https://localhost(我怀疑 https://url 最初提供了浏览器自动接受的证书,因为它是由 Verisign 颁发的) http://localhost -> normal page loads fine https://localhost -> browser claims page cannot be found https://localhost:8443 -> page cannot be found http://localhost:8443 -> offers a certificate, after accepted redirects to https://localhost (I suspect the https:// urls initially offer the certificate which is automatically accepted by the browser, as it was issued by Verisign)

如何解决?

我也试过 port="443".相同的结果.

I've also tried port="443". Same result.

推荐答案

我看起来你在 keystoreFile 属性中引用了一个证书文件......如果该文件实际上是一个证书文件,你应该使用这样的东西

I looks like you referenced a cert file in the keystoreFile attribute... if that file is actually a cert file you should use something like this

SSLCertificateFile="C:\Tomcat 6.0\ssl\cert"

...如果这是正确的(文件是证书),那么您还需要一个密钥,例如:

... if that is correct (that the file a cert) then you will also need a key, for example:

SSLCertificateKeyFile="C:\Tomcat 6.0\ssl\cert.key"

如果您有 CA 链中需要的中间证书,请添加:

If you have intermediate certs that you need in the CA chain, add:

SSLCertificateChainFile=

这篇关于Tomcat SSL 配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-30 03:35:07,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1388933.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Tomcat   SSL

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!