Check https://github.com/h5bp/server-configs-nginx for more configs
And use http://checkgzipcompression.com/ to check the compression; you can check site-wide or for individual files using absolute urls.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
How do I check if my nginx config is actually compressing assets? I have the following in my nginx.conf:
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_types
text/plain
text/css
application/json
application/x-javascript
text/xml
application/xml
application/xml+rss
text/javascript;
But Google page speed insights keeps telling me that I still need to compress .js and .svg files...?
Please or to participate in this conversation.