V
V
VisualIdeas2019-10-17 02:05:17
Nginx
VisualIdeas, 2019-10-17 02:05:17

Why is NGINX forced to unzip GZ?

The essence of the problem:
An archive with a sitemap
in the form of a sitemap-1,xml.gz file lies on the GZ server and when you try to open https://site.com/sitemap-1,xml.gz
in a browser - an error 404 , but when you try open https://site.com/sitemap-1,xml - opens unzipped file... what to do with it? nginx config responsible for this part:

location ~ ^/sitemap([0-9\-]*)\.xml(|\.gz) {
      	root /home/mygeoservices.prod/public_html/sitemaps/$host/;
        }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Mezhuev, 2019-10-17
@VisualIdeas

nginx.org/ru/docs/http/ngx_http_gzip_static_module.html
Add to location:
gzip_static off;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question