A
A
account-62017-04-05 22:09:22
Nginx
account-6, 2017-04-05 22:09:22

How to check if nginx is using static gzip files?

Static site, generated gzip copies of files.
Enabled nginx.confHow gzip_static on;
to test and make sure that nginx uses compressed versions of files?
Preferably locally, on your PC.
Are there ways without strace? I niasiled him.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DevMan, 2017-04-06
@account-6

Yes, just look at the size of the received data in the browser.

V
vman, 2017-04-06
@vman

as an option on the example of Debian

apt-get install auditd
systemctl start auditd
auditctl -w /var/www/html/index.nginx-debian.html -p arw -k nginx

restart nginx so that it throws resources out of memory,
then it will turn to the web server and look for an event in the log
ausearch -k nginx

time->Wed Apr  5 23:02:16 2017
type=PROCTITLE msg=audit(1491426136.219:255): proctitle=6E67696E783A20776F726B65722070726F63657373
type=PATH msg=audit(1491426136.219:255): item=0 name="/var/www/html/index.nginx-debian.html" inode=22156819 dev=09:02 mode=0100644 ouid=0 ogid=0 rdev=00:00 nametype=NORMAL
type=CWD msg=audit(1491426136.219:255):  cwd="/"
type=SYSCALL msg=audit(1491426136.219:255): arch=c000003e syscall=2 success=yes exit=50 a0=202e79d a1=800 a2=0 a3=202e720 items=1 ppid=8415 pid=8418 auid=4294967295 uid=33 gid=33 euid=33 suid=33 fsuid=33 egid=33 sgid=33 fsgid=33 tty=(none) ses=4294967295 comm="nginx" exe="/usr/sbin/nginx" key="nginx"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question