首页 文章

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

提问于
浏览
1

我想使用SSL将apache配置为反向代理,我无法使其工作 . 在我的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的证书 .

1 回答

  • 1

    解决了 . 我不得不评论SSLVerifyClient需要SSLVerifyDepth 10

    客户端身份验证的指令 .

相关问题