Running Confluence over https with docker and Caddy reverse proxy

tiero
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!
March 3, 2020

Hi! I read almost all previous questions about this topic and I cannot solve it, unfortunately.

My situation:

I run Confluence as docker container behind a reverse proxy (Caddy) that is also inside a container.

I Should say that running over unsecured HTTP all works correctly so it cannot be a problem of the reverse proxy/caddy, now I'm trying to move over https and doesn't seem to work.

Here's my docker-compose file

version: '3'
services:
# Confluence
confluence:
container_name: confluence
image: atlassian/confluence-server
ports:
- 8090:8090
- 8091:8091
environment:
- ATL_PROXY_NAME=confluence.mydomain.io
- ATL_PROXY_PORT=443
- ATL_TOMCAT_SCHEME=https
- ATL_TOMCAT_SECURE=true
volumes:
- $HOME/.confluence:/var/atlassian/application-data/confluence
restart: unless-stopped

# Caddy
caddy:
container_name: caddy
image: abiosoft/caddy
ports:
- 80:80
- 443:443
environment:
- CLOUDFLARE_DNS_API_TOKEN=MyTokenXXXX
volumes:
- $HOME/.caddy:/root/.caddy
- $HOME/Caddyfile:/etc/Caddyfile
depends_on:
- confluence
restart: unless-stopped


Here's my server.xml after startup

 

 

<?xml version="1.0" encoding="utf-8"?>

<Server port="8000"shutdown="SHUTDOWN">

<Listener className="org.apache.catalina.startup.VersionLoggerListener"/>
<Listener className="org.apache.catalina.core.AprLifecycleListener"
SSLEngine="on"/>
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/><Service name="Catalina">

<Connector port="8090"
maxThreads="100"
minSpareThreads="10"
connectionTimeout="20000"
enableLookups="false"
protocol="HTTP/1.1"
redirectPort="8443"
acceptCount="10"
secure="true"
scheme="https"
proxyName="confluence.mydomain.io"
proxyPort="443"relaxedPathChars="[]|"
relaxedQueryChars="[]|{}^\`&quot;&lt;&gt;"
bindOnInit="false"
maxHttpHeaderSize="8192"
useBodyEncodingForURI="true"
disableUploadTimeout="true" />

<Engine name="Standalone"
defaultHost="localhost"
debug="0">
<Host name="localhost"
debug="0"
appBase="webapps"
unpackWARs="true"
autoDeploy="false"
startStopThreads="4">
<Context path=""
docBase="../confluence"
debug="0"
reloadable="false"
useHttpOnly="true">
<!-- Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties -->
<Manager pathname=""/>
<Valve className="org.apache.catalina.valves.StuckThreadDetectionValve"
threshold="60"/>
</Context>
<Context path="${confluence.context.path}/synchrony-proxy"
docBase="../synchrony-proxy"
debug="0"
reloadable="false"
useHttpOnly="true">
<Valve className="org.apache.catalina.valves.StuckThreadDetectionValve"
threshold="60"/>
</Context></Host>
</Engine></Service></Server>


confluence.mydomain.io {
  proxy / confluence:8090 {
    transparent
  }
}


 Here's my Caddyfile

If I go over Chrome it says `ERR_TOO_MANY_REDIRECTS`

Any clue?

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events