Tomcat 配置不正确
The Tomcat server.xml 配置不正确:
scheme should be 'https'
proxyName should be 'wiki.xxx.com'
proxyPort should be 'https'
故障排除
1、安装Confluence
2、Nginx
3、confluence配置
vim /opt/atlassian/confluence/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="wiki" proxyPort="443"/>
重启confluence
service confluence restart
4、配置nginx server.conf
vim wiki.xxx.com.conf
upstream wiki.xxx.com{
server 172.16.84.252:8090;
}
server {
#listen 80 ;
listen 443 ssl;
server_name wiki.xxx.com;
ssl_certificate ssl/4152171.cn.pem;
ssl_certificate_key ssl/4152171.cn.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers AESGCM:ALL:!DH:!EXPORT:!RC4:+HIGH:!MEDIUM:!LOW:!aNULL:!eNULL;
ssl_prefer_server_ciphers on;
location / {
client_max_body_size 100m;
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://wiki.xxx.com;
}
location /synchrony {
client_max_body_size 100m;
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://wiki.xxx.com/synchrony;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
server {
listen 80;
server_name wiki.xxx.com;
rewrite ^ https://$http_host$request_uri? permanent;
}
reload nginx,配置即可
- 文章链接: https://blog.zhangcun.store/2022/09/28/nginx-tong-guo-https-xie-yi-fan-xiang-dai-li-confluence-xiang-xi-pei-zhi-guo-cheng/
- 版权声明: 本网站所有文章除特别声明外,均采用 CC BY-NC-ND 4.0 许可协议。转载请注明出处!
你的赏识是我前进的动力
支付宝
微信