Merge pull request #128 from haiwen/auto-renew-cert

allow certbot to connect to challenge location via HTTP Port 80
This commit is contained in:
Hulk 2018-12-19 10:37:26 +08:00 committed by GitHub
commit 2c102bdc74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,7 +4,16 @@
server {
listen 80;
server_name _ default_server;
rewrite ^ https://{{ domain }}$request_uri? permanent;
# allow certbot to connect to challenge location via HTTP Port 80
# otherwise renewal request will fail
location /.well-known/acme-challenge/ {
alias /var/www/challenges/;
try_files $uri =404;
}
location / {
rewrite ^ https://{{ domain }}$request_uri? permanent;
}
}
{% endif -%}