【问题标题】:Jira behind Apache SSL proxy on CentOSCentOS 上 Apache SSL 代理背后的 Jira
【发布时间】:2014-01-04 20:49:35
【问题描述】:

正如标题所说,我尝试让 Jira 在 Apache SSL 代理后面运行。

我能够在没有 SSL 的情况下使其工作,但现在我遇到了 502。当我尝试访问 https://localhost/ localhost:8080(在我在 jira 中设置代理之前没有加密)@987654322 时,我得到了相同的结果@ 和其他一些人。

这是 Jira 连接器配置。

 <Connector port="8080"

               maxThreads="150"
               minSpareThreads="25"
               connectionTimeout="20000"

               enableLookups="false"
               maxHttpHeaderSize="8192"
               protocol="HTTP/1.1"
               useBodyEncodingForURI="true"
               redirectPort="8443"
               acceptCount="100"
               disableUploadTimeout="true"
               scheme="https"
               proxyName="localhost"
               proxyPort="443"
               />

   <!--

现在 Apache VHost 配置对于类似新手的配置感到抱歉

ProxyRequests On
NameVirtualHost *:443

<VirtualHost *:443>
  SSLEngine on
  SSLCertificateFile /etc/pki/tls/certs/ca.crt
  SSLCertificateKeyFile /etc/pki/tls/private/ca.key
      SSLProxyEngine on

  ServerName localhost
  ServerAlias jira.ecoledelexcellence.ca
  ServerAlias 192.168.0.116

  ProxyRequests Off
  ProxyPreserveHost On

#  <Proxy *>
#    Order deny,allow
#    Allow from all
#  </Proxy>

  ProxyPass / https://127.0.0.1:8080/ retry=0
  ProxyPassReverse / https://127.0.0.1:8080/ retry=0

    <Location />
        Order allow,deny
        Allow from all
    </Location>

        #HTTP => HTTPS rewrite
        RewriteEngine On
        RewriteCond %{HTTPS} off
        RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>

感谢任何提示

【问题讨论】:

    标签: apache tomcat ssl proxy jira


    【解决方案1】:

    在 Tomcat 中,您应该在连接器配置中添加它是一个安全通道:

    secure="true"
    

    这告诉 Tomcat,即使 SSL 引擎没有在此连接器上初始化,传入的连接也被限定为“安全”的。 proxyName 应该是机器的外部可见名称,如果 webapp 使用 schemeproxyNameproxyPort 变量来构造 URL,这会有所帮助,请参阅:Tomcat Proxy Support

    http://tomcat.apache.org/tomcat-7.0-doc/config/http.html

    如果您希望调用 request.isSecure() 以针对此连接器收到的请求返回 true,请将此属性设置为 true。您可能希望在从 SSL 加速器(如加密卡、SSL 设备甚至网络服务器)接收数据的 SSL 连接器或非 SSL 连接器上。

    (也适用于 AJP 连接器)

    HTTP:

    对于 ProxyPass*,您不需要 https 中的“s”。 最后你也不需要重写,它会强制所有传入的连接到普通的http。

    【讨论】:

    • 我认为这正是解决我的问题的原因。我终于在同一天解决了它,但我会接受你的回答,因为我很确定你是对的。谢谢!
    猜你喜欢
    • 1970-01-01
    • 2014-11-06
    • 2018-01-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多