|
|
|
@ -5,6 +5,9 @@
|
|
|
|
|
{% set user_dir_workers = matrix_nginx_proxy_synapse_workers_list|selectattr('type', 'equalto', 'user_dir')|list %}
|
|
|
|
|
{% set frontend_proxy_workers = matrix_nginx_proxy_synapse_workers_list|selectattr('type', 'equalto', 'frontend_proxy')|list %}
|
|
|
|
|
{% if matrix_nginx_proxy_synapse_workers_enabled %}
|
|
|
|
|
{% if matrix_nginx_proxy_synapse_cache_enabled %}
|
|
|
|
|
proxy_cache_path {{ matrix_nginx_proxy_synapse_cache_path }} levels=1:2 keys_zone={{ matrix_nginx_proxy_synapse_cache_keys_zone_name }}:{{ matrix_nginx_proxy_synapse_cache_keys_zone_size }} inactive={{ matrix_nginx_proxy_synapse_cache_inactive_time }} max_size={{ matrix_nginx_proxy_synapse_cache_max_size_mb }}m;
|
|
|
|
|
{% endif %}
|
|
|
|
|
# Round Robin "upstream" pools for workers
|
|
|
|
|
|
|
|
|
|
{% if generic_workers %}
|
|
|
|
@ -95,6 +98,14 @@ server {
|
|
|
|
|
client_body_buffer_size 25M;
|
|
|
|
|
client_max_body_size {{ matrix_nginx_proxy_proxy_matrix_client_api_client_max_body_size_mb }}M;
|
|
|
|
|
proxy_max_temp_file_size 0;
|
|
|
|
|
|
|
|
|
|
{% if matrix_nginx_proxy_synapse_cache_enabled %}
|
|
|
|
|
proxy_buffering on;
|
|
|
|
|
proxy_cache {{ matrix_nginx_proxy_synapse_cache_keys_zone_name }};
|
|
|
|
|
proxy_cache_valid any {{ matrix_nginx_proxy_synapse_cache_proxy_cache_valid_time }};
|
|
|
|
|
proxy_force_ranges on;
|
|
|
|
|
add_header X-Cache-Status $upstream_cache_status;
|
|
|
|
|
{% endif %}
|
|
|
|
|
}
|
|
|
|
|
{% endfor %}
|
|
|
|
|
{% endif %}
|
|
|
|
@ -227,6 +238,14 @@ server {
|
|
|
|
|
client_body_buffer_size 25M;
|
|
|
|
|
client_max_body_size {{ matrix_nginx_proxy_proxy_matrix_federation_api_client_max_body_size_mb }}M;
|
|
|
|
|
proxy_max_temp_file_size 0;
|
|
|
|
|
|
|
|
|
|
{% if matrix_nginx_proxy_synapse_cache_enabled %}
|
|
|
|
|
proxy_buffering on;
|
|
|
|
|
proxy_cache {{ matrix_nginx_proxy_synapse_cache_keys_zone_name }};
|
|
|
|
|
proxy_cache_valid any {{ matrix_nginx_proxy_synapse_cache_proxy_cache_valid_time }};
|
|
|
|
|
proxy_force_ranges on;
|
|
|
|
|
add_header X-Cache-Status $upstream_cache_status;
|
|
|
|
|
{% endif %}
|
|
|
|
|
}
|
|
|
|
|
{% endfor %}
|
|
|
|
|
{% endif %}
|
|
|
|
|