Reverse Proxy with Confluence (apache)

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

<Server port="8000" shutdown="SHUTDOWN" debug="0">
    <Service name="Tomcat-Standalone">
<!--        <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"/>  -->
        <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"/>
        <Engine name="Standalone" defaultHost="localhost" debug="1">
            <Host name="confluence-01.domain.com" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false" startStopThreads="4">
                <Context path="" docBase="../confluence" debug="0" reloadable="false">
                    <!-- Logger is deprecated in Tomcat 5.5. Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties -->
                    <Manager pathname="" />
                    <Valve className="org.apache.catalina.valves.StuckThreadDetectionValve" threshold="60" />
                </Context>
            </Host>
        </Engine>
        <!--
            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
        -->
<!--
        <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="<MY_CERTIFICATE_PASSWORD>"/>
-->
    </Service>
</Server>

 

Apache file

<VirtualHost *:443>
    ServerName confluence-01.domain.com
        ProxyRequests Off
        <Proxy *>
          Require all granted
        </Proxy>
#        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]
        <Location />
                Require all granted
        </Location>
        ProxyPass /synchrony http://confluence-01.domain.com:8091/synchrony
        <Location /synchrony>
                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]
        </Location>
</VirtualHost>
<VirtualHost *:80>
    ServerName confluence-01.domain.com
    Redirect Permanent /  https://confluence-01.domain.com/
    Redirect Permanent /synchrony   https://confluence-01.domain.com/synchrony
</VirtualHost>

 

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.

 

3 answers

0 votes

You appear to have commented out the proxy lines in the apache config.

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

Has anyone got this working with Synchrony?

Did you take a look at either of these?:

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

1,349 views 2 13
Read article

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