简体   繁体   English

Tomcat - SSL 证书配置

[英]Tomcat - SSL certificate configure

I want to setup SSL certificate on tomcat, specification of my server:我想在 tomcat 上设置 SSL 证书,我的服务器规范:

OS: ubuntu 18.04 LTS
tomcat: 9.0.31
java: 1.8.0_242

I have these files:我有这些文件:

xyz.key
xyz.ca-bundle
xyz.crt

I want to run tomcat on port 443 although I Know I can change port by using server.xml file.我想在端口 443 上运行 tomcat,尽管我知道我可以使用server.xml文件更改端口。

By using the above files I can easily setup ssl in apache, But my question is which type of file format I should have in order to setup ssl in tomcat server and if I need some other format then how should I convert these files ?通过使用上述文件,我可以轻松地在 apache 中设置 ssl,但我的问题是我应该使用哪种类型的文件格式才能在 tomcat 服务器中设置 ssl,如果我需要其他格式,那么我应该如何转换这些文件?

Question is pretty unclear, but I assume what you're trying to do is run Tomcat standalone, not with Apache Httpd as a proxy.问题很不清楚,但我假设您尝试做的是独立运行 Tomcat,而不是使用 Apache Httpd 作为代理。 In that case, the easiest and best thing to do is to upgrade to a modern version of Java.在这种情况下,最简单和最好的方法是升级到 Java 的现代版本。 Java 9 and later support PKCS12, which is easier than using JKS, so you should upgrade, either to 11 (the current LTS release) or 14 (current release). Java 9 及更高版本支持 PKCS12,这比使用 JKS 更容易,因此您应该升级到 11(当前 LTS 版本)或 14(当前版本)。 Once that is done, you can use this tool to generate a CSR and save a key and help set up your configuration.完成后,您可以使用此工具生成 CSR 并保存密钥并帮助设置您的配置。 It might be easier than doing this by editing files.这可能比通过编辑文件更容易。

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

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