Reverse Proxy with Confluence (apache)
Asked by Neil Schulz:

Hello,

I've having an issue with my Confluence trial. In order for us to purchase this,m I need to set up a POC, however, they do not like to type in the port. I set up a reverse proxy, however, it prevents editing.

server.xml file

```
&lt;Server port="8000" shutdown="SHUTDOWN" debug="0"&gt;    &lt;Service name="Tomcat-Standalone"&gt;&lt;!--        &lt;Connector port="8090" connectionTimeout="20000" redirectPort="8443"                maxThreads="48" minSpareThreads="10"                enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"                protocol="org.apache.coyote.http11.Http11NioProtocol"/&gt;  --&gt;        &lt;Connector port="8090"        maxThreads="48"        minSpareThreads="10"        connectionTimeout="20000"        enableLookups="false"        maxHttpHeaderSize="8192"        protocol="org.apache.coyote.http11.Http11NioProtocol"        useBodyEncodingForURI="UTF-8"        redirectPort="8443"        acceptCount="10"        disableUploadTimeout="true"        proxyName="confluence-01.domain.com"        proxyPort="443"        secure="true"        scheme="https"/&gt;        &lt;Engine name="Standalone" defaultHost="localhost" debug="1"&gt;            &lt;Host name="confluence-01.domain.com" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false" startStopThreads="4"&gt;                &lt;Context path="" docBase="../confluence" debug="0" reloadable="false"&gt;                    &lt;!-- Logger is deprecated in Tomcat 5.5. Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties --&gt;                    &lt;Manager pathname="" /&gt;                    &lt;Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60" /&gt;                &lt;/Context&gt;            &lt;/Host&gt;        &lt;/Engine&gt;        &lt;!--            To run Confluence via HTTPS:             * Uncomment the Connector below             * Execute:                 %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)                 $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA  (Unix)               with a password value of "changeit" for both the certificate and the keystore itself.             * Restart and visit https://localhost:8443/             For more info, see https://confluence.atlassian.com/display/DOC/Running+Confluence+Over+SSL+or+HTTPS        --&gt;&lt;!--        &lt;Connector port="8443" maxHttpHeaderSize="8192"                   maxThreads="150" minSpareThreads="25"                   protocol="org.apache.coyote.http11.Http11NioProtocol"                   enableLookups="false" disableUploadTimeout="true"                   acceptCount="100" scheme="https" secure="true"                   clientAuth="false" sslProtocols="TLSv1,TLSv1.1,TLSv1.2" sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2" SSLEnabled="true"                   URIEncoding="UTF-8" keystorePass="&lt;MY_CERTIFICATE_PASSWORD&gt;"/&gt;--&gt;    &lt;/Service&gt;&lt;/Server&gt;
```

Apache file

```
&lt;VirtualHost *:443&gt;    ServerName confluence-01.domain.com        ProxyRequests Off        &lt;Proxy *&gt;          Require all granted        &lt;/Proxy&gt;#        ProxyPass / http://confluence-01.domain.com:8090/#        ProxyPassReverse / http://confluence-01.domain.com:8090/        SSLEngine On        SSLCertificateFile /etc/ssl/certs/cert.pem        SSLCertificateKeyFile /etc/ssl/private/key.key       RewriteEngine On       RewriteCond %{REQUEST_URI} !^/synchrony       RewriteRule ^/(.*) http://confluence-01.domain.com:8090/$1 [P]        &lt;Location /&gt;                Require all granted        &lt;/Location&gt;        ProxyPass /synchrony http://confluence-01.domain.com:8091/synchrony        &lt;Location /synchrony&gt;                Require all granted                RewriteEngine on                RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]                RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]                RewriteRule .* ws://confluence-01.domain.com:8091%{REQUEST_URI} [P]        &lt;/Location&gt;&lt;/VirtualHost&gt;&lt;VirtualHost *:80&gt;    ServerName confluence-01.domain.com    Redirect Permanent /  https://confluence-01.domain.com/    Redirect Permanent /synchrony   https://confluence-01.domain.com/synchrony&lt;/VirtualHost&gt;
```

Any idea what's going on? I receive this error when trying to edit a page.

confluence-err.PNG

When I turned off collaborative editing, I had other issues take place, like not being able to see any page templates or when trying to use macros like display child page, it was throw errors.

[](https://community.atlassian.com/t5/Confluence-questions/Reverse-Proxy-with-Confluence-apache/qaq-p/317873?attachment-id=7879){#link_1185c17d48271b}  
[](/tnckb94959/attachments/tnckb94959/confluence-questions/53669/1/confluence-err.PNG){#display_1185c17d48271b_0}


Answers:
author: Sam Hall
body: Did you take a look at either of these?:

* <https://answers.atlassian.com/questions/44336709>
* <https://answers.atlassian.com/questions/93733>

It might be worth commenting/asking for help on one or both of those questions, since the people involved seem to have had some success.

Hope you can find someone to help.

Sam


author: Neil Schulz
body: Has anyone got this working with Synchrony?


author: Nic Brough -Adaptavist-
body: You appear to have commented out the proxy lines in the apache config.

comments: author: Neil Schulz
body: The issue occurs both ways. I added in additional rewrites based on another troubleshooting thread. They didn't include the lines at all.


Tags: apache

proxy