Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Google计算引擎上的Tomcat上启用SSL_Tomcat_Ssl_Https - Fatal编程技术网

在Google计算引擎上的Tomcat上启用SSL

在Google计算引擎上的Tomcat上启用SSL,tomcat,ssl,https,Tomcat,Ssl,Https,我正在尝试在GCE上的Tomcat上启用SSL 我安装了Let's Encrypt certificate,方法如下: 在此处扫描证书: 它检查出来了 通过以下方式配置tomcat: my server.xml中的连接器如下所示: <Connector port="443" protocol="org.apache.coyote.http11.Http11Protocol" URIEncoding="UTF-8" maxThreads="150" SSLEna

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

  • 我安装了Let's Encrypt certificate,方法如下:
  • 在此处扫描证书:
  • 它检查出来了

  • 通过以下方式配置tomcat:
  • my server.xml中的连接器如下所示:

    <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"/>
    

    我的设置中缺少什么?端口443是根据防火墙规则启用的,我已经检查了“允许HTTPS流量”。如果我没有包含此连接器,则可以通过HTTP访问URL。

    在您的google cloud plataform>>google compute engine中,在虚拟机的属性中,根据您使用的Tomcat版本启用HTTPS会话防火墙

    ,例如,如果您使用的是Tomcat 7之前的版本,则需要更改“keystrepass”到“keypass”。如果您同时使用这两种方法,我将尝试遵循Tomcat的官方文档--


    您也可以在Google Compute Engine上查看启用Apache服务HTTPS协议的步骤。

    此外,运行
    openssl s_client-connect localhost:443
    表示已连接,我可以看到证书。
    The requested URL was not found on this server.