Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow .well-known directory (pki validation / letsencrypt) #1724

Merged
17 changes: 17 additions & 0 deletions scale/webservers/nginx.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,20 @@ server {
...
}
```

### Allow usage of `.well-known` directory (letsencrypt/pki validation, apple pay)
thomasnares marked this conversation as resolved.
Show resolved Hide resolved

The `.well-known` directory is a resource documented in [RFC 8615](https://datatracker.ietf.org/doc/html/rfc8615) and used by [many services](https://en.m.wikipedia.org/wiki/Well-known_URI).
If you need an external access to the `.well-known` directory, you can update you nginx configuration to use:

```nginx
# .htaccess, .DS_Store, .htpasswd, etc., but keep .well-known available
location ~* /\.(?!well-known\/) {
deny all;
}

# files in .well-known should be served as plain text.
location ~* ^/\.well-known\/ {
default_type text/plain;
}
```