From 4dd62a4934ca72a9ee6842da347408a28c5d490c Mon Sep 17 00:00:00 2001 From: Adam Spragg Date: Thu, 9 Aug 2018 18:39:55 +0100 Subject: Allow access to "hidden" files under /cgit.cgi/ directories --- apache2.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apache2.conf b/apache2.conf index 12a4e24..42c4d25 100644 --- a/apache2.conf +++ b/apache2.conf @@ -158,9 +158,10 @@ RewriteRule !\. - [H=application/x-httpd-php] # Disallow access to files/directories whose names begin with "_" or "." - # (except for /.well-known/), returning a 404. + # (except for /.well-known/ or any /cgit.cgi/), returning a 404. # This makes those files appear to not exist. RewriteCond "%{REQUEST_URI}" "!^/.well-known/" + RewriteCond "%{REQUEST_URI}" "!/cgit.cgi/" RewriteRule "/[_.]" "-" [R=404,L] # Do not list files beginning with an underscore in directory listings -- cgit v1.2.1