Add brotli
All checks were successful
/ terraform (push) Successful in 1m5s
/ ansible (push) Successful in 2m19s

This commit is contained in:
Jake Howard 2023-12-17 18:12:33 +00:00
parent 46eda36515
commit 2336e4dd5b
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 18 additions and 0 deletions

View file

@ -2,6 +2,7 @@ worker_processes auto;
error_log /var/log/nginx/error.log;
load_module /usr/lib/nginx/modules/ngx_http_brotli_filter_module.so;
load_module /usr/lib/nginx/modules/ngx_http_headers_more_filter_module.so;
pcre_jit on;
@ -37,6 +38,11 @@ http {
gzip_comp_level 3;
gzip_min_length 1024;
brotli on;
brotli_types *;
brotli_comp_level 7;
brotli_min_length 1024;
keepalive_timeout 65;
include /etc/nginx/http.d/*.conf;

View file

@ -22,6 +22,18 @@
when: ansible_os_family == 'Archlinux'
become: true
- name: Install nginx-mod-brotli
package:
name: libnginx-mod-http-brotli-filter
when: ansible_os_family != 'Archlinux'
become: true
- name: Install nginx-mod-brotli on Arch
kewlfft.aur.aur:
name: nginx-mainline-mod-brotli
when: ansible_os_family == 'Archlinux'
become: true
- name: Create config directories
file:
path: /etc/nginx/{{ item }}