How to configure nginx to cache confluence requests?

I do want to configure nginx in order to cache confluence requests, lowing the load on the Confluence server as much as possible.

Here are few details that should be considered: nginx is providing the HTTPS and gzip compression layers to confluence.

Most people are accesing Confluence are logged in.

So far it seems that Confluence/tomcat returns responses with Expire in the past and with Cache-Control: no-cache.

I tried to ignore them, and Set-Cookie, but ended up with users having their sessions swapped, which is something not acceptable.

Doe anyone have a working setup with nginx, that does succefully do caching?

1 answer

Playing and re-writing headers like Cache-Control is not good. JSP favor generation of pages. This means that your request is futile.

Years ago (2, to be exact) I have created a protest against JSP as a technique: Here it is: https://github.com/rdumitriu/agrade-yahsrv

Edit: to be more exact, the protest is against dynamic generation of pages (i.e. JSP, ASP, etc)

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,785 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