How to check whether nginx's gzip_static is effective
PHPz
PHPz 2017-05-16 17:30:02
0
1
1423

I have compiled the gzip static module and configured it as follows

gzip  on;
gzip_static on;
gzip_http_version 1.0;
gzip_disable "MSIE [1-6]\.";
gzip_vary on;

gzip_comp_level 2;
gzip_proxied any;
gzip_types text/plain text/html text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;

Then the gz package of js and css is also placed in the same directory as the source file, but I can't see access to gz in the log. Is there any way to confirm that nginx does use the gz package?

PHPz
PHPz

学习是最好的投资!

reply all(1)
伊谢尔伦
curl -I -H "Accept-Encoding: gzip,deflate" /

HTTP/1.1 200 OK
Server: nginx/1.2.3
Date: Mon, 08 Oct 2012 09:14:20 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Vary: Accept-Encoding
Set-Cookie: sfsess=5072996cb0a46.21449a2b25cb6e546fe695a152ddc5b5; expires=Tue, 09-Oct-2012 09:14:20 GMT; path=/
Content-Encoding: gzip

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template