From 014b77b7aa49cd8a41dcfa2b8f5abf6e6dd37bf2 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Thu, 2 Nov 2017 11:29:51 -0700 Subject: [PATCH] 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. --- setup/start/nginx/appconfig.ejs | 6 ++++++ setup/start/nginx/nginx.conf | 2 +- src/infra_version.js | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/setup/start/nginx/appconfig.ejs b/setup/start/nginx/appconfig.ejs index 5a4d4d97e..a040b5fc0 100644 --- a/setup/start/nginx/appconfig.ejs +++ b/setup/start/nginx/appconfig.ejs @@ -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 / { # redirect everything to HTTPS return 301 https://$host$request_uri; diff --git a/setup/start/nginx/nginx.conf b/setup/start/nginx/nginx.conf index d3adaf3fc..02f961411 100644 --- a/setup/start/nginx/nginx.conf +++ b/setup/start/nginx/nginx.conf @@ -43,7 +43,7 @@ http { listen [::]:80 default_server; 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/ { default_type text/plain; alias /home/yellowtent/platformdata/acme/; diff --git a/src/infra_version.js b/src/infra_version.js index 2e9f9bb33..b60fa0be1 100644 --- a/src/infra_version.js +++ b/src/infra_version.js @@ -7,7 +7,7 @@ exports = module.exports = { // 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 - 'version': '48.7.0', + 'version': '48.8.0', 'baseImages': [ 'cloudron/base:0.10.0' ],