I have a single machine running nginx serving http traffic for multiple domains(using same Lua codebase). For some of the domains I would like to enable gzip compression. Is it possible to enable gzip compression for specific set of domains? How?
Nginx : enabling gzip compression based on hostname
gzipnginx
Related Topic
- Nginx – Help me enable gzip compression on nginx
- Enabling HTTP Compression in WebSphere Application Server 7
- How to disable gzip compression for particular virtual host apache
- Ubuntu – Apache gzip compression
- Nginx – How to enable gzip Compression on NGINX PageSpeed Module resources
- Nginx: Disable gzip-compression for https only
- Nginx Gzip Not Working
- Nginx reverse-proxy to a cloudfront distribution and preserve gzip compression
Best Answer
Absolutely if you take a look at the documentation you can see that it is acceptable to place
gzip
in any of the following levelshttp, server, location, if in location
and as the domain is defined at theserver
level usingserver_name
we can place gzip along side it.First check your
nginx.conf
file forgzip on;
if it is present remove it.You then need to create a conf file and define where you want to use gzip.