Don't block all dot files, only .git
045e81f3da06239665bec613451b4d9358a81fdd (maybe just in conjunction with httpd 2.4) broke ACME because it blocked access to .well-known/acme-challenge, giving errors such as AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
Eelco Dolstra committed
Apr 25, 2017 at 17:58 UTC
f84b1720b39e4d745121199c026efd82998263b4
1 file changed
+2
-3
nixos-org/webserver.nix
+2
-3
@@ -46,10 +46,9 @@ let
46
Redirect /tarballs http://tarballs.nixos.org
47
Redirect /releases/nixos https://d3g5gsiof5omrk.cloudfront.net/nixos
48
49
- # Don't allow access to dot files (like .git).
49
+ # Don't allow access to .git directories.
50
RewriteEngine on
51
- RewriteCond %{THE_REQUEST} ^.*/\.
52
- RewriteRule ^(.*)$ - [R=404]
51
+ RewriteRule "^(.*/)?\.git/" - [F,L]
52
53
<Location /server-status>
54
SetHandler server-status