I have Confluence set up behind a reverse proxy.
I redirect https://skowron.it/zbyl to http://localhost/zbyl
What I have done:
- I have installed evaluation version of Confluence 6.6.0 on Windows 10 64 bit. I have not installed any plugins.
- I've added proxyName="skowron.it" proxyPort="443" scheme="https" in server.xml
- I've set <Context path="/zbyl" ...> in server.xml
- I've set <property name="confluence.webapp.context.path">/zbyl</property> in confluence.cfg.xml
- I have changed Confluence's Base URL to https://skowron.it/zbyl
It mostly works.
However I get this message on each Confluence page I visit:
"Confluence's base URL is set to https://skowron.it/zbyl but you are accessing Confluence from https://skowron.itundefined."
I have managed to debug it to a point, where AJS.contextPath() function returns undefined.
As a result some features of Confluence don't work, because the browser sends requests to bad addresses, such as: "undefined/rest/webResources/1.0/resources" or "undefined/rest/analytics/1.0/publish/bulk".
Oddly enough when I view HTML source of the generated pages. there are 3 places with "context-path", and they all have valid value: "/zbyl".
And yet AJS.contextPath() returns undefined.
For completeness those 3 places are as follows:
<meta id="confluence-context-path" name="confluence-context-path" content="/zbyl">
<meta id="confluence-base-url" name="confluence-base-url" content="https://skowron.it/zbyl">
<meta name="ajs-context-path" content="/zbyl">
<meta name="ajs-base-url" content="https://skowron.it/zbyl">
WRM._unparsedData["com.atlassian.plugins.atlassian-plugins-webresource-plugin:context-path.context-path"]="\u0022\u005C/zbyl\u0022";
I cannot find any workaround or solution for this problem.
There is however one post with similar symptoms (same broken links) here:
https://community.atlassian.com/t5/Confluence-questions/Collaborative-editing-doesn-t-work-with-NGINX-reverse-proxy/qaq-p/594986