|
|
|
@@ -153,6 +153,24 @@ server { |
|
|
|
} |
|
|
|
{% endif %} |
|
|
|
|
|
|
|
{% if matrix_nginx_proxy_enabled and matrix_nginx_proxy_proxy_synapse_metrics %} |
|
|
|
{% for worker in matrix_prometheus_scraper_synapse_workers_enabled_list %} |
|
|
|
{% if worker.metrics_port != 0 %} |
|
|
|
location /_synapse-worker-{{ worker.type }}-{{ worker.instanceId }}/metrics { |
|
|
|
resolver 127.0.0.11 valid=5s; |
|
|
|
set $backend "matrix-synapse-worker-{{ worker.type }}-{{ worker.instanceId }}:{{ worker.metrics_port }}"; |
|
|
|
proxy_pass http://$backend/_synapse/metrics; |
|
|
|
proxy_set_header Host $host; |
|
|
|
|
|
|
|
{% if matrix_nginx_proxy_proxy_synapse_metrics_basic_auth_enabled %} |
|
|
|
auth_basic "protected"; |
|
|
|
auth_basic_user_file /nginx-data/matrix-synapse-metrics-htpasswd; |
|
|
|
{% endif %} |
|
|
|
} |
|
|
|
{% endif %} |
|
|
|
{% endfor %} |
|
|
|
{% endif %} |
|
|
|
|
|
|
|
{# Everything else just goes to the API server ##} |
|
|
|
location / { |
|
|
|
{% if matrix_nginx_proxy_enabled %} |
|
|
|
|