???????Running Confluence behind NGINX with SSL | Confluence Data Center and Server 7.17 | Atlassian Documentationhttps://confluence.atlassian.com/doc/running-confluence-behind-nginx-with-ssl-858772080.html1.要严格参照官方文档配置
2.主要原因是Confluence的XSRF防护,要改的内容 <installation-directory>conf/server.xml
?3.添加nginx配置
location /synchrony {
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 ^~ /confluence/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_pass_request_headers on;
proxy_redirect http://your-domain.com/confluence/ https://your-domain.com/confluence/;
proxy_redirect http://localhost:8090/confluence/ https://your-domain.com/confluence/;
proxy_pass http://localhost:8090/confluence/;
}
|