Created
August 13, 2018 15:02
-
-
Save jlm/f415ce4c99880dead9342b78dfefef53 to your computer and use it in GitHub Desktop.
Patch nginx.tmpl from jwilder/nginx-proxy and JrCs/docker-letsencrypt-nginx-proxy-companion to allow expired certificates to renew
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
--- nginx.tmpl 2017-12-29 08:56:32.000000000 -0700 | |
+++ nginx.tmpl 2017-12-29 08:56:32.000000000 -0700 | |
@@ -193,7 +193,18 @@ | |
listen [::]:80 {{ $default_server }}; | |
{{ end }} | |
access_log /var/log/nginx/access.log vhost; | |
- return 301 https://$host$request_uri; | |
+ | |
+ location /.well-known/acme-challenge/ { | |
+ auth_basic off; | |
+ allow all; | |
+ root /usr/share/nginx/html; | |
+ try_files $uri =404; | |
+ break; | |
+ } | |
+ | |
+ location / { | |
+ return 301 https://$host$request_uri; | |
+ } | |
} | |
{{ end }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment