Protect default `temp_dir` and `log_dir` from remote access
authorPablo Zmdl <redacted>
Mon, 2 Dec 2024 06:55:03 +0000 (07:55 +0100)
committerPablo Zmdl <redacted>
Mon, 2 Dec 2024 06:55:03 +0000 (07:55 +0100)
The .htaccess doesn't work in nginx

examples/nginx/templates/default.conf.template

index ae7ee209eb967f1715ea22bfcdeac5c6d5f2ff0c..93f4be9000767e6a3f7ec2470f10034dd7f9d26d 100644 (file)
@@ -5,6 +5,11 @@ server {
     access_log /var/log/nginx/access.log;
     root /var/www/html;
 
+    location ~ /(temp|logs)/ {
+        deny all;
+        return 403;
+    }
+
     location ~ \.php$ {
         try_files $uri =404;
         fastcgi_split_path_info ^(.+\.php)(/.+)$;
git clone https://git.99rst.org/PROJECT