Confluence https配置

Confluence Tomcat配置

关闭http服务,开启https服务

1
vim conf/server.xml
1
2
3
4
5
6
7
8
9
10
11
12
<!--
<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配置

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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进程

Powered by AppBlog.CN     浙ICP备14037229号

Copyright © 2012 - 2020 APP开发技术博客 All Rights Reserved.

访客数 : | 访问量 :