From 0dcc3f7c30ef097afdf8d15d5ac83e6d9c2f1697 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 29 Feb 2024 19:46:32 +0000 Subject: [PATCH] Use regular version of nginx on Arch `nginx-mainline` requires modules be recompiled each time, and isn't handled automatically. It's still a very new and maintained release. --- ansible/files/nginx-docker.conf | 5 ++--- ansible/roles/gateway/files/nginx-cdn.conf | 3 +-- ansible/roles/headscale/files/nginx.conf | 3 +-- ansible/roles/nginx/tasks/main.yml | 6 +++--- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/ansible/files/nginx-docker.conf b/ansible/files/nginx-docker.conf index 856d58b..40342c7 100644 --- a/ansible/files/nginx-docker.conf +++ b/ansible/files/nginx-docker.conf @@ -1,9 +1,8 @@ # {{ ansible_managed }} server { - listen 443 ssl; - listen [::]:443 ssl; - http2 on; + listen 443 ssl http2; + listen [::]:443 ssl http2; server_name {{ server_name }}; set $upstream {{ upstream }}; diff --git a/ansible/roles/gateway/files/nginx-cdn.conf b/ansible/roles/gateway/files/nginx-cdn.conf index a7fae4e..2908fae 100644 --- a/ansible/roles/gateway/files/nginx-cdn.conf +++ b/ansible/roles/gateway/files/nginx-cdn.conf @@ -4,8 +4,7 @@ proxy_cache_path /var/lib/nginx/cache levels=1:2 keys_zone=cdncache:20m max_size {% for domain in cdn_domains %} server { - listen 8800 ssl proxy_protocol; - http2 on; + listen 8800 ssl http2 proxy_protocol; server_name {{ domain }}; diff --git a/ansible/roles/headscale/files/nginx.conf b/ansible/roles/headscale/files/nginx.conf index 66231aa..97047da 100644 --- a/ansible/roles/headscale/files/nginx.conf +++ b/ansible/roles/headscale/files/nginx.conf @@ -3,8 +3,7 @@ limit_req_zone $binary_remote_addr zone=headscale:10m rate=1r/m; server { - listen 8888 ssl proxy_protocol; - http2 on; + listen 8888 ssl http2 proxy_protocol; server_name headscale.jakehoward.tech; diff --git a/ansible/roles/nginx/tasks/main.yml b/ansible/roles/nginx/tasks/main.yml index c83a2c3..53c3202 100644 --- a/ansible/roles/nginx/tasks/main.yml +++ b/ansible/roles/nginx/tasks/main.yml @@ -1,6 +1,6 @@ - name: Install nginx package: - name: "{{ 'nginx-mainline' if ansible_os_family == 'Archlinux' else 'nginx' }}" + name: nginx become: true - name: Install nginx modules @@ -17,8 +17,8 @@ kewlfft.aur.aur: name: "{{ item }}" loop: - - nginx-mainline-mod-headers-more - - nginx-mainline-mod-brotli + - nginx-mod-headers-more + - nginx-mod-brotli when: ansible_os_family == 'Archlinux' become: true