Forums

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

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

Florian Bär October 30, 2017

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

0 votes
Answer accepted
Florian Bär October 30, 2017

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?

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 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

Florian Bär November 1, 2017

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

AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 1, 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.

0 votes
AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 30, 2017

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
TAGS
AUG Leaders

Atlassian Community Events