Nginx configuration for synchrony is not correct

This question is in reference to Atlassian Documentation: Running Confluence behind NGINX with SSL

I think there is an issue with /synchrony configuration. One should conditionally send "Connect" header to 8091 upstream. If you always send "Connect: Upgrade" you will and up with not working static js files.

For example this url will return 404

https://confluence.example.com/synchrony/resources/js/vendor/sockjs.min.js

 

So you need to make configuration as in nginx documentation example http://nginx.org/ru/docs/http/websocket.html

 

http {
    map $http_upgrade $connection_upgrade {
        default upgrade;
        ''      close;
    }


server {
....
    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://localhost:8091;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
		# Note using $connection_upgrade variable
		# It is not set and header is not passed to upstream for static file requests
        proxy_set_header Connection $connection_upgrade;
    }
}

 

 

1 answer

This widget could not be displayed.

This did not work for us on Confluence 6.0.7

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted 3 hours ago in Europe

Topic Tuesday: How did you learn about the AUG programme?

Back in 2010 I hadn't been using the Atlassian tools (JIRA, Confluence, Bamboo) that long and I started searching online to see if I could chat to other users primarily about how they used the produc...

12 views 0 0
View post

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