Issue getting Synchrony working with an external proxy

Kieran Bailey January 17, 2019

I am having issues getting confluence to work behind a reverse proxy which is hosted on a different server). What I am getting is when I go to add a new page or edit a page, I get the following message.

"Something went wrong after loading the editor. Copy your unsaved changes and refresh the page to keep editing."

Having a look through I can see that the issue is related to Synchrony. Below is my current nginx proxy settings along with my server.xml config

 

## nginx Config

server {
                listen          DMZ_IP:443;
                server_name     confluence.fakedomain.com;

                include /etc/nginx/conf.d/ssl.include;

                access_log /var/log/nginx/confluence.access.log;
                error_log /var/log/nginx/confluence.error.log;
                client_max_body_size 200M;
                location / {
                        include /etc/nginx/conf.d/proxy_options.include;
                        proxy_set_header X-Forwarded-Host $host;
                        proxy_set_header X-Forwarded-Server $host;
                        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                        proxy_pass       http://confluence;
            }
                location /synchrony {
                        proxy_set_header X-Forwarded-Host $host;
                        proxy_set_header X-Forwarded-Server $host;
                        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                        proxy_pass       http://confluence/synchrony;
                        proxy_http_version 1.1;
                        proxy_set_header Upgrade $http_upgrade;
                        proxy_set_header Connection "Upgrade";
            }
        }

upstream confluence {
                server INTERNAL_IP:8090;
        }

 

## server.xml Config

        <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"
                   proxyName="confluence.fakedomain.com" proxyPort="443" scheme='https'
                   />

1 answer

1 vote
Michael Levec February 4, 2019

Hi.

I am not an nginx expert, but seeing your config, I wondered. You will have to add a port definition for syncrhony (8091) similar to the one you already have for 8090. I am not sure if this is at all possible, because nginx most likely cannot have two ports for the same server as a target.

In Apache, this would look like this:

# synchrony
proxy_pass http://confluence.fakedomain.com:8091/

Please look here, contains more nginx info: 

https://confluence.atlassian.com/confkb/how-to-use-nginx-to-proxy-requests-for-confluence-313459790.html

^There is a good example for your problem

Cheers,

Mike

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events