Setup Confluence on server with jwilder/nginx-reverseproxy gives 403 when setting CATALINA_CONNECTOR

Hi all

 

I've a setup with docker. To handle the requests, i have a reverse proxy called jwilder/nginx-proxy called with the following parameters:

# docker run -d -p 80:80 -p 443:443 -v /etc/nginx/ssl:/etc/nginx/certs -v /var/run/docker.sock:/tmp/docker.sock:ro --name nginx-proxy jwilder/nginx-proxy

This uses certbot to have ssl support. 

As data storage i use a postgres sql with the following parameters:

docker run --name confluencedb -e POSTGRES_PASSWORD=PasswordHere -e POSTGRES_USER=ADMIN -e POSTGRES_DB=Confluence -d postgres

And then, i set up confluence with the following parameters:

run -v /mnt/data/confluence-data:/var/atlassian/application-data/confluence --name="baerwiki" -d -e VIRTUAL_HOST=confluence.DOMAIN.com -e CATALINA_CONNECTOR_PROXYNAME=confluence.DOMAIN.com -e CATALINA_CONNECTOR_SECURE="true" -e CATALINA_CONNECTOR_PROXYPORT="443" --link confluencedb atlassian/confluence-server

If i set up confluence without the proxy settings, i am able to setup confluence but have problems with creating a new space (which is according to the documentation because tomcat has to know the reverse proxy information). But if i set it up like this with CATALINA_* stuff, i'm not even able to connect to the instance.

 

Thanks

2 answers

1 accepted

Hi

Sorry, i have tried to find this server.xml file in my docker container but was not able to find it. Can you tell me, which directory i have to mount in the docker container to access this file?

Ann Worley Atlassian Team Oct 30, 2017

Server.xml is the conf subdirectory of the Confluence Install directory. Please see this article to find the directory on your instance: Confluence Home and other important directories

I'm not able to access this directory in my docker container. 

Ann Worley Atlassian Team Nov 01, 2017

One of my colleagues suggested that you could open a terminal session with this command, then you could navigate to the directory:

docker exec -it <containerIdOrName> bash

You will need to configure Docker to make the server.xml edits persist when the container is restarted.

Hi - How does it work if you use Tomcat's <confluence_install>conf/server.xml to add proxy support as described in Proxy Support?

For example, the connector directive looks something like

 <Connector port="8090" connectionTimeout="20000" redirectPort="8443"
maxThreads="200" minSpareThreads="10"
enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8" />

and the proxyName and proxyPort would be added so it would be similar to:

<Connector port="8090" connectionTimeout="20000" redirectPort="8443"
maxThreads="200" minSpareThreads="10"
enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8" proxyName="<subdomain>.<domain>.com"
proxyPort="443"
scheme="https"/>

I look forward to hearing how that works in your environment. 

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

2,486 views 25 10
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you