Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Tomcat 404 on docker with contextpath

fire_mail
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 7, 2020

Hi,

i want to install confluence using docker. I created a docker-compose following the official guide and added ATL_TOMCAT_CONTEXTPATH=/confluence as an environment property. When i start the container and try to access confluence, i will get a 404 error from tomcat. Confluence runs behind a traefik container which will do all the ssl and redirect stuff for /confluence. If i remove all the contextpath and subfolder stuff from confluence and traefik container, i can successfully access confluence setup page on web root. Therefore i assume that all other configs and redirects (e.g. ssl) work properly.

My setup: running docker on ubuntu 20.04 using atlassian/confluence-server docker image. Actually no java installed

My configs (simplified):

confluence:

- ATL_PROXY_NAME=<<domain>>
- ATL_PROXY_PORT=443
- ATL_TOMCAT_SCHEME=https
- ATL_TOMCAT_SECURE=true
- ATL_TOMCAT_CONTEXTPATH=/confluence

traefik:

- "traefik.http.routers.confluence.rule=Host(`<<domain>>`) && PathPrefix(`/confluence`)"
- "traefik.http.routers.confluence.entrypoints=web"
- "traefik.http.routers.confluence.middlewares=redirect-confluence-to-https@docker"
- "traefik.http.middlewares.redirect-confluence-to-https.redirectscheme.scheme=https"
- "traefik.http.routers.confluence-secure.rule=Host(`<<domain>>`) && PathPrefix(`/confluence`)"
- "traefik.http.routers.confluence-secure.entrypoints=web-secure"
- "traefik.http.routers.confluence-secure.tls.certResolver=default"
- "traefik.http.routers.confluence-secure.tls=true"
- "traefik.http.services.confluence.loadbalancer.server.port=8090"
- "traefik.http.routers.confluence-secure.middlewares=confluence-stripprefix,confluenceheaders@docker,sec-headers@file"
- "traefik.http.middlewares.confluence-stripprefix.stripprefix.prefixes=/confluence"

What am i missing? Does somebody else have a working setup like this?

1 answer

1 accepted

0 votes
Answer accepted
fire_mail
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 7, 2020

ok i solved it by my self. its just a stupid copy&paste issue as i reused the redirect config of my nextcloud container. just remove "traefik.http.middlewares.confluence-stripprefix.stripprefix.prefixes=/confluence" and i can access the setup page :)

Suggest an answer

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

Atlassian Community Events