From d924b07c290d0629250ebb234a4d38dfc9b1e2e4 Mon Sep 17 00:00:00 2001 From: ErickSkrauch Date: Wed, 15 Jun 2016 22:37:30 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=20nginx=20?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BF=D1=80=D0=B5=D0=B4=D0=BC=D0=B5=D1=82=20?= =?UTF-8?q?=D0=BA=D1=8D=D1=88=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D1=8F=20html=20=D1=84=D0=B0=D0=B9=D0=BB=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker/nginx/nginx.conf | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docker/nginx/nginx.conf b/docker/nginx/nginx.conf index 9e27807..a8e1609 100644 --- a/docker/nginx/nginx.conf +++ b/docker/nginx/nginx.conf @@ -30,7 +30,8 @@ http { root $root_path; charset utf-8; - client_max_body_size 100M; + client_max_body_size 2M; + etag on; location / { alias $frontend_path; @@ -49,8 +50,14 @@ http { fastcgi_param SERVER_NAME $host; } - # Раздача статики для frontend - location ~* ^.+\.(html|jpg|jpeg|gif|png|svg|js|json|css|zip|rar|eot|ttf|woff|ico) { + # html файлы идут отдельно, для них будет применяться E-Tag кэширование + location ~* \.html$ { + root $frontend_path; + access_log off; + } + + # Раздача статики для frontend с указанием max-кэша. Сброс будет по #hash после ребилда webpackом + location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|json|css|zip|rar|eot|ttf|woff|ico) { root $frontend_path; expires max; access_log off;