{{tag>atlassian confluence docker}} ====== Installing Confluence server in Docker behind reverse proxy ====== ===== Download Confluence docker image and pass in corresponding environment variables ===== docker run --network=atl --ip=172.20.20.3 -e ATL_PROXY_NAME=example.com -e ATL_PROXY_PORT=443 -e ATL_TOMCAT_CONTEXTPATH=confluence -e ATL_TOMCAT_SCHEME=https -v /var/lib/docker/volumes/confluenceVolume/:/var/atlassian/application-data/confluence --name="confluence" -d -p 8282:8090 -p 8383:8091 atlassian/confluence-server --network assigns this container to the network called "atl". [[https://docs.docker.com/engine/reference/commandline/network_connect/#network-implications-of-stopping-pausing-or-restarting-containers|Create the network first]]. --ip assigns static ip to the container ATL_PROXY_NAME=jiratest.example.com is URL defined in apache2 config ATL_PROXY_PORT=443 if SSL is used ATL_TOMCAT_CONTEXTPATH=confluence if you are running Confluence under a path e.g. example.com/confluence ATL_TOMCAT_SCHEME=https if SSL is used Change binded ports as necessary. ===== Configure vhost.conf file ===== Example with Jira running under root domain: # JIRA Docker Proxy Configuration: ServerName example.com Order deny,allow Allow from all ErrorLog ${APACHE_LOG_DIR}/allianz-jira-error.log CustomLog ${APACHE_LOG_DIR}/allianz-jira-access.log combined SSLProxyEngine On ProxyRequests Off ProxyPreserveHost On # Confluence ProxyPass /confluence http://localhost:8282/confluence ProxyPassReverse /confluence http://localhost:8282/confluence # Jira ProxyPass / http://localhost:8181/ ProxyPassReverse / http://localhost:8181/ Include /etc/apache2/ssl-common.conf SSLCertificateFile /etc/apache2/ssl/example.com.crt SSLCertificateKeyFile /etc/apache2/ssl/example.com.key ====== See also ====== * [[Docker commands]] * [[Confluence troubleshooting]] * [[wiki:confluence_aws_deploy|Confluence AWS deploy]] ====== References ====== * https://hub.docker.com/r/atlassian/confluence-server * https://confluence.atlassian.com/confkb/can-t-check-base-url-warning-in-confluence-6-6-or-later-939718433.html