I've got this in my nginx config:
location ~ /\. { deny all; } location /.well-known/ { allow all; }
But I still can't access http://example.com/.well-known/acme-challenge/taUUGC822PcdnCnW_aADOzObZqFm3NNM5PEzLNFJXRU
. How do I allow access to just that one dot directory?
You have a regex location and a prefix location. The regex location takes precedence unless ^~
is used with the prefix location. Try:
location ~ /\. { deny all; } location ^~ /.well-known/ { # allow all; }
See this document for details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With