apache - 使用 https 将 Apache 配置为 Tomcat 的反向代理

标签 apache ssl https proxy tomcat7

我想将 apache 配置为使用 SSL 的反向代理,但我无法让它工作。 在我的 SSL 配置文件中:

  ProxyRequests off 
  SSLProxyEngine on
  ProxyPreserveHost on
  ProxyPass /examples http://host.ex.org:8080/examples
  ProxyPassReverse /examples http://host.ex.org:8080/examples
  ProxyPass /examples https://host.ex.org:8443/examples2
  ProxyPassReverse /examples https://host.ex.org:8443/examples2

  SSLCertificateFile    /path/server.crt
  SSLCertificateKeyFile /path/server.key
  SSLCACertificateFile  /path/ca.crt
  SSLProxyCACertificateFile "/path/tomcat_ca.crt"

在 Tomcat 的 server.xml 文件中我配置了连接器:

<Connector port="8443" maxThreads="200"
    scheme="https" secure="true" SSLEnabled="true" 
    keystoreFile="/path/tomcat.ks" keystorePass="***"
    clientAuth="false" sslProtocol="TLS"/>

我已经启用了 ssl、代理和缓存模块。它适用于 http 但不适用于 https。 日志告诉我 SSL 配置正确,但连接到 https://localhost/examples2我有以下错误:

ssl_error_handshake_failure_alert

这让我认为这是一个证书问题,但 apache2 和 tomcat7 都使用他们的证书和 https。

最佳答案

已解决。 我不得不评论 SSLVerifyClient 要求 SSLVerifyDepth 10

客户端身份验证指令。

关于apache - 使用 https 将 Apache 配置为 Tomcat 的反向代理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30454334/

相关文章:

.htaccess - 附加域重定向到 HTTPS

internet-explorer - 如何在 IE 中使用 CORS 从 https 调用 http?

php - 从 PHP 网站进行 Git checkout ?

java - 如何安装 Xuggler?

php - 我可以将最大 session 长度设置多高?

java - 似乎 Set-Cookie 的过期格式为 Mon, 25 Sep 2017 13 :40:02 GMT could not be parsed my apache http client

ssl - 在 Ubuntu 16 和 Nginx 中禁用 Diffie-Hellman (DH) key

java - gRPC : Generate certificateChainFile and privateKeyFile to make TLS/SSL work

wordpress - 通过 htaccess 的特定 Wordpress 页面 SSL 异常

Java HttpURLConnection 使用弱密码连接