Add brotli
This commit is contained in:
parent
46eda36515
commit
2336e4dd5b
2 changed files with 18 additions and 0 deletions
|
@ -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;
|
||||
|
|
|
@ -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 }}
|
||||
|
|
Loading…
Reference in a new issue