Topic: iRedMail new install 1.3.1: Improve gzip compression on nginx
==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.1
- Deployed with iRedMail Easy or the downloadable installer? installer
- Linux/BSD distribution name and version: Debian 10
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB
- Web server (Apache or Nginx):nginx
- Manage mail accounts with iRedAdmin-Pro? yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Hello Zhang,
I found that despite gzip compression is on, many well compressable items are not compressed by nginx.
Cause: MIME type is application/javascript and not (only) text/javascript.
To fix it, change
gzip_types text/plain text/css text/xml text/javascript text/json application/json application/x-javascript application/xml application/xml+rss;
to
gzip_types text/plain text/css text/xml text/javascript text/json application/json application/x-javascript application/xml application/xml+rss application/javascript;
in /etc/nginx/conf-enabled/gzip.conf
In addition to above, 6% less data with reasonable CPU consumption can be achieved by setting compression level to 6
gzip_comp_level 6;
Please check for faster page loading times and fewer traffic
Best regards,
Bernhard
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.