From 91624037c7d73eb545478aab2f8abc55fc224453 Mon Sep 17 00:00:00 2001 From: Alexandre Alapetite Date: Fri, 11 Oct 2024 09:25:43 +0200 Subject: Apache protect more non-public folders and files (#6881) * Apache protect more non-public folders * Also protect root * Do the same for /p/ * Simplify Require all denied In case of Apache 2.2, it will just make an error 500 instead of 403 * .htaccess.dist * Simplify * Better comment --- cli/.htaccess | 12 +----------- cli/prepare.php | 12 +----------- 2 files changed, 2 insertions(+), 22 deletions(-) (limited to 'cli') diff --git a/cli/.htaccess b/cli/.htaccess index 32eca30f7..b66e80882 100644 --- a/cli/.htaccess +++ b/cli/.htaccess @@ -1,11 +1 @@ -# Apache 2.2 - - Order Allow,Deny - Deny from all - Satisfy all - - -# Apache 2.4 - - Require all denied - +Require all denied diff --git a/cli/prepare.php b/cli/prepare.php index 414b48cd8..0b9faf044 100755 --- a/cli/prepare.php +++ b/cli/prepare.php @@ -25,17 +25,7 @@ foreach ($dirs as $dir) { } file_put_contents(DATA_PATH . '/.htaccess', <<<'EOF' -# Apache 2.2 - - Order Allow,Deny - Deny from all - Satisfy all - - -# Apache 2.4 - - Require all denied - +Require all denied EOF ); -- cgit v1.2.3