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;
Posted at Nginx Forum: