Skip to content
Snippets Groups Projects
Commit 17f976b2 authored by ale's avatar ale
Browse files

Merge branch 'nginx-cache-tuning' into 'master'

Tune nginx proxy_cache_path parameters

See merge request !309
parents 19b86685 49a7cd66
No related branches found
No related tags found
1 merge request!309Tune nginx proxy_cache_path parameters
Pipeline #83730 passed
......@@ -9,9 +9,6 @@ nginx_https_port: 443
# How much memory to use for key caching in the proxy_cache.
nginx_cache_keys_mem: "64m"
# How much disk space to use for the cache.
nginx_cache_fs_size: "1g"
# URL of the SSO login server.
sso_server_url: "https://login.{{ domain_public[0] }}/"
......
......@@ -21,12 +21,11 @@ proxy_http_version 1.1;
# Set up a global cache.
include /etc/nginx/accept.map;
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=global:{{ nginx_cache_keys_mem }} max_size={{ nginx_cache_fs_size }} inactive=1d use_temp_path=off;
proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=global:{{ nginx_cache_keys_mem }} {% for k, v in nginx_cache_params | combine(nginx_cache_custom_params | default({})) | dictsort %} {{ k }}={{ v }}{% endfor %};
proxy_cache_key "$scheme$host$request_uri$http_accept_simplified$sent_http_content_language";
proxy_no_cache $cookie_SSO $http_authorization;
proxy_cache_methods GET HEAD;
proxy_cache_valid 200 10m;
proxy_cache_min_uses 2;
# Show our own error pages, not the remote ones.
proxy_intercept_errors on;
......
---
nginx_cache_params:
# Use nginx_cache_fs_size for backwards compatibility.
max_size: "{{ nginx_cache_fs_size | default('1g') }}"
inactive: "1h"
use_temp_path: "off"
manager_files: 1000
loader_files: 1000
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment