在Google Compute Engine的Tomcat上启用SSL

编程入门 行业动态 更新时间:2024-10-25 02:19:33
本文介绍了在Google Compute Engine的Tomcat上启用SSL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试在GCE上的Tomcat上启用SSL.

I'm trying to enable SSL on Tomcat on GCE.

  • 我按照以下步骤安装了让我们加密证书":
  • certbot.eff/#ubuntutyakkety-apache

  • 在此处扫描了证书:
  • www.ssllabs/ssltest/analyze.html?d = mydomain

    它签出.

    通过以下操作
  • 配置tomcat:
  • community.letsencrypt/t/how-to-to-use-the-certificate-for-tomcat/3677

    server.xml中的连接器如下所示:

    Connector in my server.xml looks like this:

    <Connector port="443" protocol="org.apache.coyote.http11.Http11Protocol" URIEncoding="UTF-8" maxThreads="150" SSLEnabled="true" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="/home/me/certs/MyKeystore.jks" keystorePass="password" keyAlias="tomcat" keyPass="password"/>

    重启Tomcat之后,当我进入 https + ://www.mydomain 时,浏览器不信任该证书,并且显示

    After restarting Tomcat, when I go to https + ://www.mydomain the browser doesn't trust the cert, and it says

    The requested URL was not found on this server.

    设置中我缺少什么?端口443在防火墙规则下已启用,并且我已选中允许HTTPS通信".如果我不包括此连接器,则可以通过HTTP访问URL.

    What am I missing in my setup? Port 443 is enabled under firewall rules, and I have `Allow HTTPS traffic' checked. If I don't include this connector the URL can be accessed via HTTP.

    推荐答案

    根据Tomcat版本,您需要进行一些更改,例如,如果您使用的是Tomcat 7之前的Tomcat版本,则需要更改"keystorePass"更改为"keypass".两者都使用,我会尝试遵循官方文档Tomcat 6.0 - 7.0 - 8.0 .

    Depending on the Tomcat version you are using some thing change, for example if you are using a version of Tomcat prior to Tomcat 7, you need to change "keystorePass" to "keypass". You are using both, I would try following the official documentation Tomcat 6.0 - 7.0 - 8.0.

    您还可以在其他位置查看其他线程可以找到在Google Compute Engine上启用Apache服务的HTTPS协议的步骤.

    You can also check this other thread where you can find the steps to enable HTTPS protocol of your Apache service on Google Compute Engine.

    更多推荐

    在Google Compute Engine的Tomcat上启用SSL

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

    发布评论

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

    >www.elefans.com

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