Welcome! Log In Create A New Profile

Advanced

Limiting gzip_static to two directories.

January 16, 2015 06:56PM
I have gzip enabled in Nginx as well as gzip_static. I am trying to limit gzip_static to just one or two sections. There are pre-compressed files inside the directory: media/po_compressor/ along with sub directories of this such as:
media/po_compressor/4/js
media/po_compressor/4/css

Here is what I have below in nginx. What is the best way to look inside directory and sub-directories using location entry?


## Gzip Static module to compress CSS, JS
location /media/po_compressor/ {
gzip_static on;
expires 365d;
add_header Pragma public;
add_header Cache-Control "public, must-revalidate, proxy-revalidate";
}

## Compression
gzip on;
gzip_buffers 16 8k;
gzip_comp_level 4;
gzip_http_version 1.0;
gzip_min_length 1280;
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript image/x-icon image/bmp;
gzip_vary on;
Subject Author Posted

Limiting gzip_static to two directories.

tommygunner January 16, 2015 06:56PM

Re: Limiting gzip_static to two directories.

tommygunner January 16, 2015 07:14PM

Re: Limiting gzip_static to two directories.

B.R. January 17, 2015 05:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 278
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