Solve the problem that nginx gzip does not take effect on html pages

gzip_types adds text/html types:

as follows:

gzip on;

gzip_vary on;

gzip_proxied any;

gzip_comp_level 6;

gzip_buffers 16 8k;

gzip_http_version 1.1;

gzip_types text/plain text/html text/css application/ json application/ javascript text/xml application/xml application/xml+rss text/ javascript ;

The post to solve the problem that nginx gzip does not work for html pages first appeared on Lenix Blog .

This article is reprinted from https://blog.p2hp.com/archives/9755
This site is for inclusion only, and the copyright belongs to the original author.