Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do I configure Confluence in Docker behind HA Proxy?

David Bond September 29, 2020

After install, and configuring Docker environment variables, the following are working:

  • Basic UI
  • Connection to Jira for user management

However, there is a box top right on EVERY page:

--

Tomcat config is incorrect

The Tomcat server.xml has an incorrect configuration:

scheme should be 'https'
proxyName should be 'confluence.<MYDOMAIN>.com'
proxyPort should be '443'

--

There is NO WAY to set scheme via environment variables, as far as I can tell.  The other two are configured correctly, I believe.

My docker.compose's .env file contains:

ATL_JDBC_URL=jdbc:postgresql://POSTGRES_SERVER_REDACTED:5432/confluence
ATL_JDBC_USER=POSTGRES_USERNAME_REDACTED
ATL_JDBC_PASSWORD=POSTGRES_PASSWORD_REDACTED
ATL_DB_TYPE=postgresql

ATL_PROXY_NAME=confluence.<MYDOMAIN>.com
ATL_PROXY_PORT=443
ATL_TOMCAT_PORT=8090

1 answer

1 accepted

1 vote
Answer accepted
David Bond September 30, 2020

To answer my own question:

Your .env file should look like this:

ATL_JDBC_URL=jdbc:postgresql://POSTGRES_SERVER_REDACTED:5432/confluence
ATL_JDBC_USER=POSTGRES_USERNAME_REDACTED
ATL_JDBC_PASSWORD=POSTGRES_PASSWORD_REDACTED
ATL_DB_TYPE=postgresql

ATL_PROXY_NAME=confluence.<MYDOMAIN>.com
ATL_PROXY_PORT=443
ATL_TOMCAT_PORT=8090
ATL_TOMCAT_SCHEME=https
ATL_TOMCAT_SECURE=false

Note the last two lines.

Hope this helps someone!

Webeazy Consulting December 22, 2020

Indeed you can also add the following env variables directly in environment section of your confluence/jira service (in your docker-compose.yml)

 

environment:
ATL_PROXY_NAME:confluence.<MYDOMAIN>.com
ATL_PROXY_PORT:443
ATL_TOMCAT_PORT:8090
ATL_TOMCAT_SCHEME: "https"
ATL_TOMCAT_SECURE: "false"
Enissay March 15, 2021

@David Bond Can you please share your HAProxy config as well ?

david_bond March 16, 2021

haproxy.cfg relevant lines:

backend confluence_<mydomain>_com
server <servername> <serverip>:8090 check

domain2backend.map relevant lines:

confluence.<mydomain>.com confluence_<mydomain>_com
Enissay March 16, 2021

@David Bond Sadly I ended up making my own post, please feel free to comment should you see anything wrong with my config 

https://community.atlassian.com/t5/Jira-Software-questions/Jira-Software-on-Docker-HTTP-Status-404-Not-Found/qaq-p/1640076#M129101

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events