From f68c0c8b9be1ec26ce91da57fe28e7fac40202f8 Mon Sep 17 00:00:00 2001 From: nd Date: Sun, 28 Jun 2020 00:44:25 +0200 Subject: [PATCH 1/2] remove check_mk monitoring support --- tasks/main.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index d974a6a..30347d6 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -86,15 +86,6 @@ - name: delete nginx default config file: path=/etc/nginx/sites-enabled/default state=absent -- name: copy monitoring config - copy: - src: monitoring.cfg - dest: /etc/check_mk/nginx_status.cfg - owner: root - group: root - mode: 0644 - when: nginx.monitoring - - name: copy nginx status config copy: src: monitoring From b5ed095d35a7f77d8db6aeb52427fe1d0c5bbb73 Mon Sep 17 00:00:00 2001 From: nd Date: Sun, 5 Jul 2020 15:33:49 +0200 Subject: [PATCH 2/2] add support to add headers to proxy --- templates/vhost.conf.j2 | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/templates/vhost.conf.j2 b/templates/vhost.conf.j2 index fe80cb8..c21b80a 100644 --- a/templates/vhost.conf.j2 +++ b/templates/vhost.conf.j2 @@ -32,12 +32,17 @@ server { proxy_pass {{ vhost.backend }}; # add proxy headers - proxy_set_header Host {% if 'host' in vhost %}"{{ vhost.host }}"{% else %}$host{% endif %}; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $scheme; - proxy_set_header X-Forwarded-Ssl $https; - proxy_set_header X-Url-Scheme $scheme; + proxy_set_header Host {% if 'host' in vhost %}"{{ vhost.host }}"{% else %}$host{% endif %}; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_set_header X-Forwarded-Ssl $https; + proxy_set_header X-Url-Scheme $scheme; + + # custom proxy headers +{% for header in vhost.add_proxy_headers|d({}) if header %} + proxy_set_header {{ header }} "{{ vhost.add_proxy_headers[header] }}"; +{% endfor %} # Websockets proxy_http_version 1.1;