Welcome! Log In Create A New Profile

Advanced

try_files and gzip_static

July 17, 2017 05:26PM
From my knowledge, try_files works with gzip_static if both compressed and uncompressed files exist, but with "gunzip on;", it doesn't seem like try_files becomes aware of this, and so it'll only serve either the compressed or uncompressed file.

Any idea how to get around this? I can't serve the files directly as there's no file extension in the uri, and it's rewritten.

My config for that block:

location ~ ^/view/c1/(\w+)/(\d+)(/|\.html)?$ {
    gzip_static on;
    gunzip on;

    add_header Cache-Control "public, must-revalidate";
    try_files /static/b_$1/$2.html /view.php?b=$1&t=$2;
}
Subject Author Posted

try_files and gzip_static

DonaldCock July 17, 2017 05:26PM

Re: try_files and gzip_static

DonaldCock July 22, 2017 02:23PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 233
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready