From f0abe361faa175db3e0e238a7e1a3e65e5af6ec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ba=CC=81lint=20Szekeres?= Date: Sun, 14 Apr 2019 22:07:42 +0200 Subject: [PATCH] do not log missing favicon, robots.txt fixes #56 --- .../conf/nginxconfig.io/general.conf.html | 22 +++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/public/templates/conf/nginxconfig.io/general.conf.html b/public/templates/conf/nginxconfig.io/general.conf.html index 9b47925..705485d 100644 --- a/public/templates/conf/nginxconfig.io/general.conf.html +++ b/public/templates/conf/nginxconfig.io/general.conf.html @@ -13,6 +13,20 @@ add_header Strict-Transport-Security "max-age=31536000{{ isHSTSSubdomains() ? '; # . files location ~ /\.(?!well-known) { deny all; +} + +# favicon.ico +location = /favicon.ico { + log_not_found off; + access_log off; +} + +# robots.txt +location = /robots.txt { + log_not_found off; + access_log off; } @@ -23,7 +37,7 @@ location ~ /\.(?!well-known) { --># assets location ~* \.(?:{{ extensions.assets }})$ { expires {{ data.expires_assets }}; + ✔ accessLog --> access_log off; }# {{ data.expires_assets && data.expires_assets === data.expires_media ? 'assets, ' : '' }}media location ~* \.(?:{{ data.expires_assets && data.expires_assets === data.expires_media ? extensions.assets + '|' : '' }}{{ extensions.images }}|{{ extensions.audio }}|{{ extensions.video }})$ { expires {{ data.expires_media }}; + ✔ accessLog --> access_log off; } + ✔ accessLog --> access_log off; } + ✔ accessLog --> access_log off; }