From 9f5874aecf96b8f3b528f1037f39d6487d896a88 Mon Sep 17 00:00:00 2001 From: Eclair5748 Date: Fri, 19 Apr 2024 11:59:49 +1000 Subject: [PATCH 1/2] docker: restrict access to private resources addresses issue #3 --- docker/apache/http.conf | 10 +++++++++- docker/apache/https.conf | 10 ++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/docker/apache/http.conf b/docker/apache/http.conf index 24bb1d2..f496ba5 100644 --- a/docker/apache/http.conf +++ b/docker/apache/http.conf @@ -16,11 +16,19 @@ ErrorLog /dev/null RewriteRule ^ http://%{HTTP_HOST}/%1 [R=301] RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule .* $0.php - Options Indexes FollowSymLinks + Options FollowSymLinks AllowOverride None Require all granted +# deny access to private resources + + Require all denied + + Require all denied + + + LoadModule rewrite_module modules/mod_rewrite.so LoadModule mpm_prefork_module modules/mod_mpm_prefork.so LoadModule authn_file_module modules/mod_authn_file.so diff --git a/docker/apache/https.conf b/docker/apache/https.conf index db032dd..ca5edf5 100644 --- a/docker/apache/https.conf +++ b/docker/apache/https.conf @@ -21,12 +21,18 @@ ErrorLog /dev/null RewriteRule ^ http://%{HTTP_HOST}/%1 [R=301] RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule .* $0.php - Options Indexes FollowSymLinks + Options FollowSymLinks AllowOverride None Require all granted - +# deny access to private resources + + Require all denied + + Require all denied + + LoadModule rewrite_module modules/mod_rewrite.so LoadModule mpm_prefork_module modules/mod_mpm_prefork.so From ccddba91db05417b3502f0c669acf6b07c11a79d Mon Sep 17 00:00:00 2001 From: Eclair5748 Date: Fri, 19 Apr 2024 12:00:50 +1000 Subject: [PATCH 2/2] docker: use restart: unless-stopped instead addresses issue #3 --- docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index f4ae0aa..df41b23 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -4,7 +4,7 @@ version: "3.7" services: fourget: image: luuul/4get:latest - restart: always + restart: unless-stopped environment: - FOURGET_VERSION=6 - FOURGET_SERVER_NAME=4get.ca