Does anyone have experience with *succesfully* running Jira behind an nginx reverse proxy, using nginx's proxy_cache? This should provide at least a moderate boost in performance if configured correctly.
I have just started experimenting with this, although I supsect I will find some problems with my current (very basic) configuration:
proxy_cache_path /var/run/nginx-cache levels=1:2 keys_zone=nginx-cache:50m max_size=50m inactive=1440m;
proxy_temp_path /var/run/nginx-cache/tmp;
server {
server_name jira.example.com;
location / {
proxy_set_header Host $host;
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_pass http://127.0.0.1:8080;
proxy_cache nginx-cache;
proxy_cache_key "$scheme://$host$request_uri";
proxy_cache_valid 1440m;
proxy_cache_min_uses 1;
}
}
I have the expire times set very high (24 hours) intentionally to try to experiment with how long I can cache stuff, and to make it easier for me to ascertain what downsides there may be to using the proxy_cache (at least in this configuration).
Mainly I suspect I should add some more config so that it does not try to cache any authentication or admin areas.