Is this article still accurate?

This question is in reference to Atlassian Documentation: How to use NGINX to proxy requests for Confluence

I can't get it to work as documented with Confluence 5.9.

I can come close with the following nginx.conf file:

server {
     ...
    location /blah/ {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://stupefied_franklin:8090/blah/;
    }
}

Note that I had to put a trailing slash after blah.

The resulting configuration mostly does the job, but with one critical exception: the create space dialog opens but spins forever (the space blueprint icons never load) ...

Does someone have an example nginx.conf and server.xml file I can use as reference?

1 answer

0 vote
Daniel Eads Community Champion Mar 30, 2016

Hi Thomas,

Here's the relevant location portion from our nginx config:

location / {
        proxy_pass          http://localhost:8090;
        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_set_header    X-Real-IP $remote_addr;
        proxy_redirect      off;
        client_max_body_size 10M;
        proxy_connect_timeout 30s;
    }

And the connector from server.xml:

<Connector port="8090" connectionTimeout="20000" redirectPort="8443"
                maxThreads="200" minSpareThreads="10"
                enableLookups="false" acceptCount="10" debug="0" URIEncoding="UTF-8"
                protocol="HTTP/1.1"
                scheme="https"
                proxyName="wiki.example.org"
                proxyPort="443"/>

We're currently on 5.9.4; previously we were on 5.7.1 with the same configuration. We are terminating TLS at nginx, so the scheme and proxyPort settings in server.xml should be updated to http and 80 if you're not using nginx for SSL/TLS.

 

It's also worth checking to make sure the baseURL in Confluence is correct.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Apr 13, 2018 in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

1,777 views 25 10
Join discussion

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