summaryrefslogtreecommitdiff
path: root/docker/apache
diff options
context:
space:
mode:
authorlolcat <will@lolcat.ca>2024-04-19 02:17:51 +0000
committerlolcat <will@lolcat.ca>2024-04-19 02:17:51 +0000
commit55a093925fbcca4bbee38f1185a6ccb1584fd4c3 (patch)
treef22911ade555f97a7c6b3a43a4ef0a5aaf4a939c /docker/apache
parent12b67af69c7a3fe4d82b5a30fe0e1eeb6db2fc34 (diff)
parentccddba91db05417b3502f0c669acf6b07c11a79d (diff)
Merge pull request 'Address 'Docker: multiple issues'' (#7) from Eclair5748/4get:master into master
Reviewed-on: https://git.lolcat.ca/lolcat/4get/pulls/7 looks good
Diffstat (limited to 'docker/apache')
-rw-r--r--docker/apache/http.conf10
-rw-r--r--docker/apache/https.conf10
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
</Directory>
+# deny access to private resources
+<Directory "/var/www/html/4get/data">
+ Require all denied
+ <Files "*">
+ Require all denied
+ </Files>
+</Directory>
+
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
</Directory>
-
+# deny access to private resources
+<Directory "/var/www/html/4get/data">
+ Require all denied
+ <Files "*">
+ Require all denied
+ </Files>
+</Directory>
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so