From 6fc78796483a1c3f3afd0e0ebacea156bed2b1b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20D=C3=A9siles?= <1536672+cdesiles@users.noreply.github.com> Date: Sat, 11 Apr 2026 22:53:06 +0200 Subject: [PATCH] fix: uptime-kuma reverse proxy config --- roles/uptime_kuma/tasks/main.yml | 6 ++++++ roles/uptime_kuma/templates/nginx-vhost.conf.j2 | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/roles/uptime_kuma/tasks/main.yml b/roles/uptime_kuma/tasks/main.yml index 1063194..9e1a4d4 100644 --- a/roles/uptime_kuma/tasks/main.yml +++ b/roles/uptime_kuma/tasks/main.yml @@ -70,6 +70,12 @@ become: false become_user: "{{ ansible_user }}" +- name: Provision TLS certificate for uptime-kuma + ansible.builtin.include_tasks: "{{ role_path }}/../nginx/tasks/certbot.yml" + vars: + certbot_hostname: "{{ uptime_kuma_nginx_hostname }}" + when: uptime_kuma_nginx_enabled + - name: Deploy nginx vhost configuration for uptime-kuma ansible.builtin.template: src: nginx-vhost.conf.j2 diff --git a/roles/uptime_kuma/templates/nginx-vhost.conf.j2 b/roles/uptime_kuma/templates/nginx-vhost.conf.j2 index 4b5c13e..e0ace55 100644 --- a/roles/uptime_kuma/templates/nginx-vhost.conf.j2 +++ b/roles/uptime_kuma/templates/nginx-vhost.conf.j2 @@ -46,9 +46,10 @@ server { # WebSocket support for real-time updates proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; + proxy_set_header Connection $http_connection; # Disable buffering for real-time updates proxy_buffering off; + proxy_read_timeout 3600s; } }