-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #253 from yanokwa/fix-renewal-bug
Fix LetsEncrypt renewal failures
- Loading branch information
Showing
4 changed files
with
47 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
server { | ||
# Listen only on port 81 for localhost, and nothing else. | ||
server_name 127.0.0.1; | ||
listen 127.0.0.1:81 default_server; | ||
|
||
charset utf-8; | ||
|
||
# Certbot's folder used for the ACME challenge response. | ||
location ^~ /.well-known/acme-challenge { | ||
default_type text/plain; | ||
root /var/www/letsencrypt; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
server { | ||
# Listen on plain old HTTP and catch all requests so they can be redirected | ||
# to HTTPS instead. | ||
listen 80 default_server reuseport; | ||
listen [::]:80 default_server reuseport; | ||
|
||
# Pass this particular URL off to the certbot server so it can properly | ||
# respond to the Let's Encrypt ACME challenges for the HTTPS certificates. | ||
location '/.well-known/acme-challenge' { | ||
default_type "text/plain"; | ||
proxy_pass http://localhost:81; | ||
} | ||
|
||
# Everything else gets shunted over to HTTPS for each user defined | ||
# server to handle. | ||
location / { | ||
return 301 https://$http_host$request_uri; | ||
} | ||
} |
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