From c1916502f99608148d56989e73250dde56e94d45 Mon Sep 17 00:00:00 2001 From: Till Brehm Date: Tue, 8 May 2018 13:43:08 +0200 Subject: [PATCH] Fixed#5019 LE cert problem in mirror setups. This patch disables the creation of Let's encrypt SSL certs on mirrored slave servers. --- server/plugins-available/apache2_plugin.inc.php | 2 +- server/plugins-available/nginx_plugin.inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 25e1a4514b..83c499d976 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1187,7 +1187,7 @@ class apache2_plugin { $vhost_data['ssl_bundle_file'] = $bundle_file; //* Generate Let's Encrypt SSL certificat - if($data['new']['ssl'] == 'y' && $data['new']['ssl_letsencrypt'] == 'y' && ( // ssl and let's encrypt is active + if($data['new']['ssl'] == 'y' && $data['new']['ssl_letsencrypt'] == 'y' && $conf['mirror_server_id'] == 0 ( // ssl and let's encrypt is active and no mirror server ($data['old']['ssl'] == 'n' || $data['old']['ssl_letsencrypt'] == 'n') // we have new let's encrypt configuration || ($data['old']['domain'] != $data['new']['domain']) // we have domain update || ($data['old']['subdomain'] != $data['new']['subdomain']) // we have new or update on "auto" subdomain diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index ece90a9463..a7d7cf5e82 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -1270,7 +1270,7 @@ class nginx_plugin { $vhost_data['ssl_bundle_file'] = $bundle_file; //* Generate Let's Encrypt SSL certificat - if($data['new']['ssl'] == 'y' && $data['new']['ssl_letsencrypt'] == 'y' && ( // ssl and let's encrypt is active + if($data['new']['ssl'] == 'y' && $data['new']['ssl_letsencrypt'] == 'y' && $conf['mirror_server_id'] == 0 && ( // ssl and let's encrypt is active and no mirror server ($data['old']['ssl'] == 'n' || $data['old']['ssl_letsencrypt'] == 'n') // we have new let's encrypt configuration || ($data['old']['domain'] != $data['new']['domain']) // we have domain update || ($data['old']['subdomain'] != $data['new']['subdomain']) // we have new or update on "auto" subdomain -- GitLab