From 519cab5e82efd1e0f84ecc284d23a7476d94eb04 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov <38059171+askvortsov1@users.noreply.github.com> Date: Mon, 17 Feb 2020 14:56:35 -0500 Subject: [PATCH] Use location directives in Flarum's skeleton, don't repeat with our own. (#48) --- rootfs/etc/nginx/nginx.conf | 45 +------------------------------------ 1 file changed, 1 insertion(+), 44 deletions(-) diff --git a/rootfs/etc/nginx/nginx.conf b/rootfs/etc/nginx/nginx.conf index 53ba09e..52f84af 100644 --- a/rootfs/etc/nginx/nginx.conf +++ b/rootfs/etc/nginx/nginx.conf @@ -29,29 +29,6 @@ http { uwsgi_temp_path /tmp/uwsgi 1 2; scgi_temp_path /tmp/scgi 1 2; - gzip on; - gzip_comp_level 5; - gzip_min_length 512; - gzip_buffers 4 8k; - gzip_proxied any; - gzip_vary on; - gzip_disable "msie6"; - gzip_types - text/css - text/javascript - text/xml - text/plain - text/x-component - application/javascript - application/x-javascript - application/json - application/xml - application/rss+xml - application/vnd.ms-fontobject - font/truetype - font/opentype - image/svg+xml; - server { listen ; charset utf-8; @@ -62,27 +39,7 @@ http { client_max_body_size ; fastcgi_buffers 64 4K; - location / { - try_files $uri $uri/ /index.php?$query_string; - } - - # Assets cache control - # -------------------------------------- - location ~* \.(?:html|xml|json)$ { - expires -1; - } - - location ~* \.(?:css|js)$ { - expires 7d; - add_header Pragma public; - add_header Cache-Control "public"; - } - - location ~* \.(?:gif|jpe?g|png|ico|otf|eot|svg|ttf|woff|woff2)$ { - expires 30d; - add_header Pragma public; - add_header Cache-Control "public"; - } + include /flarum/app/.nginx.conf; # PHP Backend # --------------------------------------