I’m trying to enable gzip within nginx. The tutorials I’ve come across say it’s as simple as adding some gzip configurations to nginx.conf:
http {
gzip on;
gzip_disable “msie6”;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_min_length 256;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon;
}
But this doesn’t seem to do the trick (I’ve tried restarting the server – btw, nginx doesn’t show up within the box after ssh’ing and running service --status-all?)
The curl test / chrome headers don’t show gzip running:
cycle@BBP$ curl -H “Accept-Encoding: gzip” -I http://local-site.dev
HTTP/1.1 200 OK
Server: nginx/1.10.1
Date: Fri, 24 Feb 2017 12:22:05 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Vary: Accept-Encoding
X-Powered-By: PHP/7.0.3
Link: http:/local-site.dev/wp-json/; rel="https://api.w.org/"
Link: http://local-site.dev/; rel=shortlink