JIRA反向代理Nginx(Mismatched URL Scheme)解决方案

报错信息

官方给的SSL解决方案是使用Apache Tomcat配置SSL,但是我自己这里类比着使用了Ngnix的方案。然而登陆页面提示下面的信息,官网提供的链接也没有解决,最后终于找到了方法,记录在这里。

We’ve detected a potential problem with JIRA’s Dashboard configuration that your administrator can correct. Hide
Dashboard Diagnostics: Mismatched URL Scheme
JIRA is reporting that it is using the URL scheme ‘http’, which does not match the scheme used to run these diagnostics, ‘https’. This is known to cause JIRA to construct URLs using an incorrect hostname, which will result in errors in the dashboard, among other issues.
The most common cause of this is the use of a reverse-proxy HTTP(S) server (often Apache or IIS) in front of the application server running JIRA. While this configuration is supported, some additional setup might be necessary in order to ensure that JIRA detects the correct scheme.

The following articles describe the issue and the steps you should take to ensure that your web server and app server are configured correctly:

If you believe this diagnosis is in error, or you have any other questions, please contact Atlassian Support.

报错信息

解决方案

打开server.xml文件,一般存放于/usr/local/atlassian/jira/conf/server.xml,修改如下配置

...
    <Service name="Catalina">
        <Connector port="8103"
                   maxThreads="150"
                   minSpareThreads="25"
                   maxSpareThreads="75"
                   connectionTimeout="20000"
                   enableLookups="false"
                   maxHttpHeaderSize="8192"
                   protocol="HTTP/1.1"
                   useBodyEncodingForURI="true"
                   redirectPort="8443"
                   acceptCount="100"
                   disableUploadTimeout="true"

<!-- 如果没有下面的属性,添加并修改 -->
        scheme="https"
        proxyName="example.org"
        proxyPort="443"
/>
...

ProxyPort的值要和真实访问的端口一致,不管经过几次跳转,输入面向用户的端口。
例:用户访问443→路由跳转6080→Nginx跳转7080,这种情况,属性内填入443即可。

猜你喜欢

转载自blog.csdn.net/yomo127/article/details/80311365
今日推荐