-
-
Save Decicus/085692d927a0ea9751dffe10337331a9 to your computer and use it in GitHub Desktop.
NGINX alias for mapping Let's Encrypt "webroot" challenge to one directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Just an example, but basically you'd save this under something like `/etc/nginx/letsencrypt.conf` | |
# Then inside your configuration for your website inside the `server` block, you'd also do: `include letsencrypt.conf` | |
# Reload/restart NGINX config, then request a certificate and point the webroot to `/var/www/html` (or whatever else you changed it to, if you did). | |
location /.well-known/acme-challenge { | |
# Change `/var/www/html` to something that makes sense for your configuration. | |
# Just make sure to use the correct directory when using webroot challenge, if you do end up changing it. | |
alias /var/www/html/.well-known/acme-challenge; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment