From ea45e523ea7fc47764be77e335f13d880d3da9ca Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Fri, 10 Apr 2020 13:59:56 +0100 Subject: [PATCH] Replace ping file with NGINX Means we can turn off access logs --- nginx.conf | 6 +++++- scripts/build.sh | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/nginx.conf b/nginx.conf index bfe1ee0..6328c62 100644 --- a/nginx.conf +++ b/nginx.conf @@ -12,7 +12,6 @@ events { http { include /etc/nginx/mime.types; - default_type application/octet-stream; access_log /dev/stdout; access_log /var/log/nginx/access.log; @@ -44,6 +43,11 @@ http { access_log off; } + location /ping { + access_log off; + return 200; + } + error_page 404 /404.html; error_page 500 502 503 504 /50x.html; } diff --git a/scripts/build.sh b/scripts/build.sh index 2a7ccff..93b57d8 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -30,5 +30,3 @@ cp $BASEDIR/static/keybase.txt $OUTPUT_DIR/keybase.txt mkdir -p $OUTPUT_DIR/.well-known/matrix cp $BASEDIR/static/matrix.json $OUTPUT_DIR/.well-known/matrix/server - -touch $OUTPUT_DIR/ping.txt