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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How do I configure Confluence in Docker behind HA Proxy?

Edited

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

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!

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"

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

haproxy.cfg relevant lines:

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

domain2backend.map relevant lines:

confluence.<mydomain>.com confluence_<mydomain>_com

@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
Community showcase
Published in Confluence

Confluence Mythbusters: Does Atlassian even use Confluence?

Hi, Confluence collaborators! As part of #Confluence-Collaboratory month, we’ve created a very special Mythsbusters segment, where we're dive into an interesting myth and uncover the truth behind i...

1,358 views 7 28
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you