Confluence reverse proxy configuration
Asked by sbeutel:

Hi,

want to access Confluence over a reverse proxy. I already configured a reverse proxy for Jira.

Jira works fine with the configuration, but I'm not able to configure the proxy for Confluence.

**Jira Configuration:**

\<VirtualHost \*:80\>  
ServerName jira.domain.io  
ServerAlias www.jira.domain.io  
ProxyRequests Off  
\<Proxy \*\>  
Require all granted  
\</Proxy\>  

ProxyPass / http://localhost:9909/  
ProxyPassReverse / http://localhost:9909/  
\<Location /\>  
Require all granted  
\</Location\>  
\</VirtualHost\>

**Confluence Configuration (from documentation):**

\<VirtualHost \*:80\>  
ServerName confluence.domain.io  
ServerAlias www.confluence.domain.io  
ErrorLog "logs/confluence.domain.io-error.log"  
CustomLog "logs/confluence.domain.io-access.log" combined  

ProxyRequests Off  

\<Proxy \*\>  
Require all granted  
\</Proxy\>

ProxyPass /synchrony http://localhost:8061/synchrony

\<Location /synchrony\>  
Require all granted  
RewriteEngine on  
RewriteCond %{HTTP:UPGRADE} \^WebSocket$ \[NC\]  
RewriteCond %{HTTP:CONNECTION} Upgrade$ \[NC\]  
RewriteRule .\* ws://localhost:8061%{REQUEST_URI} \[P\]  
\</Location\>

ProxyPass / http://localhost:8060/  
ProxyPassReverse / http://localhost:8060/

\<Location /\>  
Require all granted  
\</Location\>  

\</VirtualHost\>

All necessary apache modules (mod_proxy_http, mod_proxy, mod_proxy_ajp, mod_proxy_connect, mod_proxy_wstunnel, mod_rewrite ) are enabled.

The only message I get in the browser is:

Forbidden {#toc-hId-1765808608}
-------------------------------

You don't have permission to access / on this server.

Any hints where to look, what to change? Even in the log file I can't see anything.


Answers:
author: AnnWorley
body: Stephan, your Apache configuration as posted looks good per [Proxying Atlassian server applications with Apache HTTP Server (mod_proxy_http)](https://confluence.atlassian.com/kb/proxying-atlassian-server-applications-with-apache-http-server-mod_proxy_http-806032611.html)

Please let us know more:

* Do you have a context path defined in \<confluence_install\>/conf/server.xml?
* What version of Apache are you running?
* Do you have an [.htaccess](https://www.digitalocean.com/community/tutorials/how-to-use-the-htaccess-file) file?
* Are you using one proxy for both JIRA and Confluence?
* Please post the entire httpd.conf file (redacting anything private, of course)

I look forward to learning more about the issue and finding the resolution.

comments: author: sbeutel
body: Hi Ann,

- I have no context path defined in server.xml.

- Apache version: 2.4.17

- No .htaccess file

- The same Apache server as proxy used with Jira

I just tried to use the same configuration as for my Jira, but it doesn't worked (Only URL and port changed).

httpd.conf is most standard. Only changed loaded modules.

You can find it here:

<https://drive.google.com/open?id=1fqJVM-vkCei325G7fOExw2Mv1lhaSu49>


author: sbeutel
body: Just upgraded my Apache installation to 2.4.29.

All reverse proxies are working, except Confluence.


author: sbeutel
body: Hi,

just fixed it. I'm using an IPv6 tunnel where I also have to do some configuration stuff.


author: AnnWorley
body: Thanks for letting us know. Any relevant details will be very welcome to the next person who struggles with this issue. If you have time, please follow up with any tips.


Tags: apache

proxy