From 9928f0c6a67aedd120df421e3b1b5d39132028e3 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Sat, 30 Sep 2023 12:53:56 +1000 Subject: [PATCH] nginx: Block some non content files --- nginx.conf | 5 +++++ ping | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) delete mode 100644 ping diff --git a/nginx.conf b/nginx.conf index 46512d2..a9302d0 100644 --- a/nginx.conf +++ b/nginx.conf @@ -15,6 +15,11 @@ server { log_not_found off; } + location ~* (nginx.conf|Dockerfile|cleanup.ps1|cleanup.bat|README.md|LICENSE.md) { + deny all; + } + + # Custom 404 page error_page 404 /404.html; root /usr/share/nginx/html; diff --git a/ping b/ping deleted file mode 100644 index ed53c21..0000000 --- a/ping +++ /dev/null @@ -1 +0,0 @@ -pong \ No newline at end of file