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即可。

全部评论

相关推荐

05-24 14:12
门头沟学院 Java
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
06-12 18:53
第一次听说还有无水工作!!!又是被刷新三观的一天
Lynn012:666第一次听到,你给他说这里不方便我们加个微信
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务