W
W
wiyod2018-03-02 22:03:03
Nginx
wiyod, 2018-03-02 22:03:03

How to check that gzip is working and how to properly configure it in nginx?

Where in DevTools to see exactly what gzip works?
I'm trying to set up gzip on nginx. I made this config, but nothing has changed

server {
  listen 80;
  listen [::]:80;

  server_name example.com;

  root /home/deploy/example-com/dist;
  index index.html;
  gzip_static on;

  location / {
    try_files $uri $uri/ =404;
  }

  location /form {
    proxy_pass http://form_data/form;
}
}

Along this path lies static root /home/deploy/example-com/dist;
How to set everything up and make sure that it works?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
ky0, 2018-03-02
@wiyod

Look at the header Content-Encodingin the server response. If gzip is present there, then everything is ok.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question