Skip to content
Snippets Groups Projects
Commit 0d3fe3d5 authored by Bartłomiej Piotrowski's avatar Bartłomiej Piotrowski
Browse files

nginx: enable gzip and brotli compression

parent 02f1ea4d
No related branches found
No related tags found
No related merge requests found
---
- name: install nginx
pacman: name=nginx,certbot state=present
pacman: name=nginx,nginx-mod-brotli,certbot state=present
- name: install nginx.service snippet
copy: src=nginx.service.d dest=/etc/systemd/system owner=root group=root mode=0644
......
worker_processes auto;
load_module /usr/lib/nginx/modules/ngx_http_brotli_filter_module.so;
load_module /usr/lib/nginx/modules/ngx_http_brotli_static_module.so;
events {
worker_connections 1024;
}
......@@ -14,6 +17,13 @@ http {
keepalive_timeout 65;
client_max_body_size 16M;
gzip on;
gzip_comp_level 6;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
brotli on;
brotli_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
index index.php index.html index.htm;
access_log syslog:server=unix:/dev/log,nohostname,tag=nginx_http;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment