From c03b041f40f471cd0c17c8d9709844e6325284b4 Mon Sep 17 00:00:00 2001 From: slawkens Date: Tue, 28 Feb 2023 19:05:34 +0100 Subject: [PATCH] add .git to denied folders in nginx --- nginx-sample.conf | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/nginx-sample.conf b/nginx-sample.conf index 6e13122b..c5fa3720 100644 --- a/nginx-sample.conf +++ b/nginx-sample.conf @@ -3,7 +3,7 @@ server { root /home/otserv/www/public; index index.php; server_name your-domain.com; - + location ~ /system { deny all; return 404; @@ -13,6 +13,11 @@ server { deny all; } + location ~ /\.git { + return 404; + deny all; + } + location / { try_files $uri $uri/ /index.php; } @@ -22,4 +27,4 @@ server { fastcgi_read_timeout 240; fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; } -} \ No newline at end of file +}