From e913e179c67ee7da64021231b99d9318841b839c Mon Sep 17 00:00:00 2001 From: "Alexander Demidov (Vostro)" Date: Mon, 8 Jul 2019 14:06:29 +0300 Subject: [PATCH] staticfiles.conf --- staticfiles.conf | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 staticfiles.conf diff --git a/staticfiles.conf b/staticfiles.conf new file mode 100644 index 0000000..1563c71 --- /dev/null +++ b/staticfiles.conf @@ -0,0 +1,32 @@ +rewrite ^(.*)\.(\d+)\.(css|js)$ $1.$3 break; +location ~* \.(jpg|jpeg|gif|png|svg|ico)$ { + access_log off; + expires max; + log_not_found off; + error_page 404 = /empty; + + #location ~ ^/\d*.jpg$ { + # default_type 'image/jpeg'; + # content_by_lua_file image.lua; + } +} +#location ~ ^/\d*.html$ { +# rewrite_by_lua_file redirect_to_product.lua; +#} +location = /empty { + expires 0; + empty_gif; +} +location ~* \.(eot|ttf|woff|pdf|css|js)$ { + access_log off; + expires max; +} +#location ~* \.(xml|xls)$ { +# add_header Cache-Control "no-cache"; +#} +location ~ /\. { + deny all; +} +location ~* \.(tpl|ini|sh) { + deny all; +}