-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trying something to fix the auto ssl renewal process
- Loading branch information
Showing
6 changed files
with
48 additions
and
19 deletions.
There are no files selected for viewing
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
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
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
25 changes: 25 additions & 0 deletions
25
rootfs/etc/nginx/conf.d/include/letsencrypt-acme-challenge.conf
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Rule for legitimate ACME Challenge requests (like /.well-known/acme-challenge/xxxxxxxxx) | ||
# We use ^~ here, so that we don't check other regexes (for speed-up). We actually MUST cancel | ||
# other regex checks, because in our other config files have regex rule that denies access to files with dotted names. | ||
location ^~ /.well-known/acme-challenge/ { | ||
|
||
# Set correct content type. According to this: | ||
# https://community.letsencrypt.org/t/using-the-webroot-domain-verification-method/1445/29 | ||
# Current specification requires "text/plain" or no content header at all. | ||
# It seems that "text/plain" is a safe option. | ||
default_type "text/plain"; | ||
|
||
# This directory must be the same as in /etc/letsencrypt/cli.ini | ||
# as "webroot-path" parameter. Also don't forget to set "authenticator" parameter | ||
# there to "webroot". | ||
# Do NOT use alias, use root! Target directory is located here: | ||
# /var/www/common/letsencrypt/.well-known/acme-challenge/ | ||
root /config/letsencrypt-acme-challenge; | ||
} | ||
|
||
# Hide /acme-challenge subdirectory and return 404 on all requests. | ||
# It is somewhat more secure than letting Nginx return 403. | ||
# Ending slash is important! | ||
location = /.well-known/acme-challenge/ { | ||
return 404; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
#!/usr/bin/with-contenv bash | ||
|
||
mkdir -p /config/letsencrypt-acme-challenge | ||
|
||
cd /srv/manager | ||
node --abort_on_uncaught_exception --max_old_space_size=250 /srv/manager/src/backend/index.js |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
text = True | ||
non-interactive = True | ||
authenticator = webroot | ||
webroot-path = /config/letsencrypt-acme-challenge |