2019-05-07 19:23:35 +00:00
|
|
|
#jinja2: lstrip_blocks: "True"
|
2019-08-07 09:53:53 +00:00
|
|
|
|
2021-01-25 07:21:17 +00:00
|
|
|
server {
|
|
|
|
listen 12080;
|
2021-11-05 13:31:10 +00:00
|
|
|
{% if matrix_nginx_proxy_enabled %}
|
|
|
|
server_name {{ matrix_nginx_proxy_proxy_synapse_hostname }};
|
|
|
|
{% endif %}
|
2019-05-08 18:49:51 +00:00
|
|
|
|
2021-01-25 07:21:17 +00:00
|
|
|
server_tokens off;
|
|
|
|
root /dev/null;
|
|
|
|
|
|
|
|
gzip on;
|
|
|
|
gzip_types text/plain application/json;
|
2019-05-08 18:49:51 +00:00
|
|
|
|
2021-01-25 07:21:17 +00:00
|
|
|
{% for configuration_block in matrix_nginx_proxy_proxy_synapse_additional_server_configuration_blocks %}
|
2019-01-17 11:32:46 +00:00
|
|
|
{{- configuration_block }}
|
|
|
|
{% endfor %}
|
2018-10-21 21:20:37 +00:00
|
|
|
|
2021-01-25 07:21:17 +00:00
|
|
|
{# Everything else just goes to the API server ##}
|
|
|
|
location / {
|
2019-05-29 05:32:06 +00:00
|
|
|
{% if matrix_nginx_proxy_enabled %}
|
|
|
|
{# Use the embedded DNS resolver in Docker containers to discover the service #}
|
2022-10-29 22:55:36 +00:00
|
|
|
resolver {{ matrix_nginx_proxy_http_level_resolver }} valid=5s;
|
2021-01-25 07:21:17 +00:00
|
|
|
set $backend "{{ matrix_nginx_proxy_proxy_synapse_client_api_addr_with_container }}";
|
2019-05-29 05:32:06 +00:00
|
|
|
proxy_pass http://$backend;
|
|
|
|
{% else %}
|
|
|
|
{# Generic configuration for use outside of our container setup #}
|
2021-01-25 07:21:17 +00:00
|
|
|
proxy_pass http://{{ matrix_nginx_proxy_proxy_synapse_client_api_addr_sans_container }};
|
2019-05-29 05:32:06 +00:00
|
|
|
{% 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;
|
|
|
|
}
|
2019-12-06 09:53:09 +00:00
|
|
|
}
|
|
|
|
|
2021-01-25 07:21:17 +00:00
|
|
|
{% if matrix_nginx_proxy_proxy_synapse_federation_api_enabled %}
|
2019-12-06 09:53:09 +00:00
|
|
|
server {
|
2021-01-25 07:21:17 +00:00
|
|
|
listen 12088;
|
2021-11-05 13:31:10 +00:00
|
|
|
{% if matrix_nginx_proxy_enabled %}
|
|
|
|
server_name {{ matrix_nginx_proxy_proxy_synapse_hostname }};
|
|
|
|
{% endif %}
|
2019-12-06 09:53:09 +00:00
|
|
|
|
|
|
|
server_tokens off;
|
|
|
|
|
|
|
|
root /dev/null;
|
|
|
|
|
|
|
|
gzip on;
|
|
|
|
gzip_types text/plain application/json;
|
|
|
|
|
2019-02-05 09:07:08 +00:00
|
|
|
location / {
|
|
|
|
{% if matrix_nginx_proxy_enabled %}
|
|
|
|
{# Use the embedded DNS resolver in Docker containers to discover the service #}
|
2022-10-29 22:55:36 +00:00
|
|
|
resolver {{ matrix_nginx_proxy_http_level_resolver }} valid=5s;
|
2021-01-25 07:21:17 +00:00
|
|
|
set $backend "{{ matrix_nginx_proxy_proxy_synapse_federation_api_addr_with_container }}";
|
2019-02-05 09:07:08 +00:00
|
|
|
proxy_pass http://$backend;
|
|
|
|
{% else %}
|
|
|
|
{# Generic configuration for use outside of our container setup #}
|
2021-01-25 07:21:17 +00:00
|
|
|
proxy_pass http://{{ matrix_nginx_proxy_proxy_synapse_federation_api_addr_sans_container }};
|
2019-02-05 09:07:08 +00:00
|
|
|
{% 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 %}
|