From 810a1eafde743373d7cd9f2c8daa517c9dd2fb95 Mon Sep 17 00:00:00 2001 From: Jonas Kaninda Date: Fri, 1 Jul 2022 19:17:19 +0200 Subject: [PATCH 1/2] Fix nginx permission --- entrypoint.sh | 8 +++++--- src/conf/nginx/default.conf | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index e7a5ea8..fa29d95 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -125,9 +125,11 @@ if [ -f /var/www/html/conf/nginx/nginx-site.conf ]; then } # deny access to Apache .htaccess on Nginx with PHP, # if Apache and Nginx document roots concur - location ~ /\.ht { - deny all; - } + location ~ /\.ht {deny all;} + location ~ /\.svn/ {deny all;} + location ~ /\.git/ {deny all;} + location ~ /\.hg/ {deny all;} + location ~ /\.bzr/ {deny all;} } EOF diff --git a/src/conf/nginx/default.conf b/src/conf/nginx/default.conf index 17d42a7..06dfb47 100644 --- a/src/conf/nginx/default.conf +++ b/src/conf/nginx/default.conf @@ -33,7 +33,9 @@ server { } # deny access to Apache .htaccess on Nginx with PHP, # if Apache and Nginx document roots concur - location ~ /\.ht { - deny all; - } + location ~ /\.ht {deny all;} + location ~ /\.svn/ {deny all;} + location ~ /\.git/ {deny all;} + location ~ /\.hg/ {deny all;} + location ~ /\.bzr/ {deny all;} } \ No newline at end of file From 243511bb831ee29b77ade0798f46841903d6774c Mon Sep 17 00:00:00 2001 From: Jonas Kaninda Date: Fri, 1 Jul 2022 19:18:16 +0200 Subject: [PATCH 2/2] Fix nginx permission --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index fa29d95..641ffc9 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -125,7 +125,7 @@ if [ -f /var/www/html/conf/nginx/nginx-site.conf ]; then } # deny access to Apache .htaccess on Nginx with PHP, # if Apache and Nginx document roots concur - location ~ /\.ht {deny all;} + location ~ /\.ht {deny all;} location ~ /\.svn/ {deny all;} location ~ /\.git/ {deny all;} location ~ /\.hg/ {deny all;}