Fix LE cert renewal failures

LE contacts the server by hostname and not by IP. This means that
when installing and reconfiguring the app it hits the default_server
route since nginx configs for the app are not generated at.

When doing in the daily cert renew, the nginx configs exist and we
are unable to renew the certs.
This commit is contained in:
Girish Ramakrishnan
2017-11-02 11:29:51 -07:00
parent 06f8aa8f29
commit 014b77b7aa
3 changed files with 8 additions and 2 deletions

View File

@@ -26,6 +26,12 @@ server {
} }
<% } -%> <% } -%>
# acme challenges (for cert renewal where the vhost config exists)
location /.well-known/acme-challenge/ {
default_type text/plain;
alias /home/yellowtent/platformdata/acme/;
}
location / { location / {
# redirect everything to HTTPS # redirect everything to HTTPS
return 301 https://$host$request_uri; return 301 https://$host$request_uri;

View File

@@ -43,7 +43,7 @@ http {
listen [::]:80 default_server; listen [::]:80 default_server;
server_name does_not_match_anything; server_name does_not_match_anything;
# acme challenges # acme challenges (for app installation and re-configure when the vhost config does not exist)
location /.well-known/acme-challenge/ { location /.well-known/acme-challenge/ {
default_type text/plain; default_type text/plain;
alias /home/yellowtent/platformdata/acme/; alias /home/yellowtent/platformdata/acme/;

View File

@@ -7,7 +7,7 @@
exports = module.exports = { exports = module.exports = {
// a major version makes all apps restore from backup. #451 must be fixed before we do this. // a major version makes all apps restore from backup. #451 must be fixed before we do this.
// a minor version makes all apps re-configure themselves // a minor version makes all apps re-configure themselves
'version': '48.7.0', 'version': '48.8.0',
'baseImages': [ 'cloudron/base:0.10.0' ], 'baseImages': [ 'cloudron/base:0.10.0' ],