Confluence https配置

Confluence Tomcat配置

关闭http服务,开启https服务

vim conf/server.xml

<!--
<Connector port="8090" connectionTimeout="20000" redirectPort="8443"
           maxThreads="48" minSpareThreads="10"
           enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
           protocol="org.apache.coyote.http11.Http11NioProtocol"/>
-->

<Connector port="8090" connectionTimeout="20000" redirectPort="8443"
           maxThreads="48" minSpareThreads="10"
           enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
           protocol="org.apache.coyote.http11.Http11NioProtocol"
           scheme="https" secure="true" proxyName="cf.yezhou.me" proxyPort="443"/>

Nginx配置

server {
    listen       443 ssl;
    server_name  cf.appblog.cn;
    ssl_certificate /data/ssl/cf/cf.appblog.cn.pem;
    ssl_certificate_key /data/ssl/cf/cf.appblog.cn.key;

    location / {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

        set $backend "http://127.0.0.1:8090";
        proxy_pass $backend;
        proxy_redirect http://127.0.0.1:8090 http://$host/;
        proxy_set_header Authorization "";
    }
    location /synchrony-proxy {
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://localhost:8091/synchrony;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
    }
    location /synchrony {
        set $backend "http://127.0.0.1:8091";
        proxy_pass $backend;
        proxy_redirect http://127.0.0.1:8091 http://$host/;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Authorization "";
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}

重启Confluence前记得干掉synchrony进程

Confluence启动有两个进程,主进程confluence及协同进程synchrony,重启需要同时干掉confluencesynchrony进程

版权声明:
作者:Joe.Ye
链接:https://www.appblog.cn/index.php/2023/03/31/confluence-https-configuration/
来源:APP全栈技术分享
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
打赏
海报
Confluence https配置
Confluence Tomcat配置 关闭http服务,开启https服务 vim conf/server.xml <!-- <Connector port="8090" connectionTimeout="20000&quo……
<<上一篇
下一篇>>
文章目录
关闭
目 录