mirror of
https://github.com/spantaleev/matrix-docker-ansible-deploy.git
synced 2024-12-12 08:43:55 +02:00
72 lines
2.1 KiB
Django/Jinja
72 lines
2.1 KiB
Django/Jinja
#jinja2: lstrip_blocks: "True"
|
|
|
|
server {
|
|
listen 12080;
|
|
{% if matrix_nginx_proxy_enabled %}
|
|
server_name {{ matrix_nginx_proxy_proxy_synapse_hostname }};
|
|
{% endif %}
|
|
|
|
server_tokens off;
|
|
root /dev/null;
|
|
|
|
gzip on;
|
|
gzip_types text/plain application/json;
|
|
|
|
{% for configuration_block in matrix_nginx_proxy_proxy_synapse_additional_server_configuration_blocks %}
|
|
{{- configuration_block }}
|
|
{% endfor %}
|
|
|
|
{# Everything else just goes to the API server ##}
|
|
location / {
|
|
{% if matrix_nginx_proxy_enabled %}
|
|
{# Use the embedded DNS resolver in Docker containers to discover the service #}
|
|
resolver {{ matrix_nginx_proxy_http_level_resolver }} valid=5s;
|
|
set $backend "{{ matrix_nginx_proxy_proxy_synapse_client_api_addr_with_container }}";
|
|
proxy_pass http://$backend;
|
|
{% else %}
|
|
{# Generic configuration for use outside of our container setup #}
|
|
proxy_pass http://{{ matrix_nginx_proxy_proxy_synapse_client_api_addr_sans_container }};
|
|
{% endif %}
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
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_proxy_synapse_federation_api_enabled %}
|
|
server {
|
|
listen 12088;
|
|
{% if matrix_nginx_proxy_enabled %}
|
|
server_name {{ matrix_nginx_proxy_proxy_synapse_hostname }};
|
|
{% endif %}
|
|
|
|
server_tokens off;
|
|
|
|
root /dev/null;
|
|
|
|
gzip on;
|
|
gzip_types text/plain application/json;
|
|
|
|
location / {
|
|
{% if matrix_nginx_proxy_enabled %}
|
|
{# Use the embedded DNS resolver in Docker containers to discover the service #}
|
|
resolver {{ matrix_nginx_proxy_http_level_resolver }} valid=5s;
|
|
set $backend "{{ matrix_nginx_proxy_proxy_synapse_federation_api_addr_with_container }}";
|
|
proxy_pass http://$backend;
|
|
{% else %}
|
|
{# Generic configuration for use outside of our container setup #}
|
|
proxy_pass http://{{ matrix_nginx_proxy_proxy_synapse_federation_api_addr_sans_container }};
|
|
{% endif %}
|
|
|
|
proxy_set_header Host $host;
|
|
|
|
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;
|
|
}
|
|
}
|
|
{% endif %}
|