File tree Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Expand file tree Collapse file tree 2 files changed +23
-2
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ libretime_api_systemd_override:
5151# #######################################################################################
5252libretime_legacy_managed : true
5353libretime_legacy_web_root : /usr/share/libretime/legacy
54+ libretime_legacy_cache_paths : []
5455
5556# > Postgresql
5657# #######################################################################################
Original file line number Diff line number Diff line change 1+ {% if libretime_legacy_cache_paths -%}
2+ fastcgi_cache_path /var/lib/nginx/cache levels=1:2 keys_zone=legacy:100m;
3+ fastcgi_cache_key "$request_method$scheme$host$request_uri";
4+
5+ map $request_uri $no_cache {
6+ default "1";
7+ {% for path in libretime_legacy_cache_paths %}
8+ "{{ path }}" "0";
9+ {% endfor %}
10+ }
11+
12+ {% endif -%}
13+
114server {
215 listen {{ libretime_listen_port }};
316 listen [::]:{{ libretime_listen_port }};
@@ -21,13 +34,20 @@ server {
2134 # try_files $uri =404;
2235 try_files $fastcgi_script_name =404;
2336
24- include fastcgi_params;
25-
2637 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
2738 set $path_info $fastcgi_path_info;
2839 fastcgi_param PATH_INFO $path_info;
2940 include fastcgi_params;
3041
42+ {% if libretime_legacy_cache_paths -%}
43+ fastcgi_cache legacy;
44+ fastcgi_cache_valid 200 5s;
45+
46+ fastcgi_no_cache $no_cache;
47+ fastcgi_cache_bypass $no_cache;
48+
49+ {% endif -%}
50+
3151 fastcgi_index index.php;
3252 fastcgi_pass unix:/run/libretime-legacy.sock;
3353 }
You can’t perform that action at this time.
0 commit comments