aboutsummaryrefslogtreecommitdiffstats
path: root/src/server/plugins-available
diff options
context:
space:
mode:
authorMathias Schiller <m.schiller@rem-media.de>2015-12-06 11:49:51 +0100
committerMathias Schiller <m.schiller@rem-media.de>2015-12-06 11:49:51 +0100
commitf70e8aff9290e2d390fb799ea08c50ecb86d730d (patch)
tree39ef208f4869f7202c6e52d26547f9843bf07832 /src/server/plugins-available
parentff1ec87918f6955393fe5b03f9bd85562006d29f (diff)
fix for corrupt chain on mobil device (e.g. safari on ipad)
Diffstat (limited to 'src/server/plugins-available')
-rwxr-xr-xsrc/server/plugins-available/apache2_plugin.inc.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/server/plugins-available/apache2_plugin.inc.php b/src/server/plugins-available/apache2_plugin.inc.php
index 66486b8..2ba7efe 100755
--- a/src/server/plugins-available/apache2_plugin.inc.php
+++ b/src/server/plugins-available/apache2_plugin.inc.php
@@ -961,8 +961,9 @@ class apache2_plugin {
$lddomain .= (string) " --domains www." . $domain;
}
- $crt_tmp_file = "/etc/letsencrypt/live/".$domain."/fullchain.pem";
+ $crt_tmp_file = "/etc/letsencrypt/live/".$domain."/cert.pem";
$key_tmp_file = "/etc/letsencrypt/live/".$domain."/privkey.pem";
+ $bundle_tmp_file = "/etc/letsencrypt/live/".$domain."/chain.pem";
$webroot = $data['new']['document_root']."/web";
//* check if we have already a Let's Encrypt cert
@@ -1013,6 +1014,18 @@ class apache2_plugin {
exec("ln -s ".escapeshellcmd($crt_tmp_file)." ".escapeshellcmd($crt_file));
}
+ if(is_file($bundle_file)) {
+ $app->system->copy($bundle_file, $bundle_file.'.old.'.$date);
+ $app->system->chmod($bundle_file.'.old.'.$date, 0400);
+ $app->system->unlink($bundle_file);
+ }
+
+ if($web_config["website_symlinks_rel"] == 'y') {
+ $this->create_relative_link(escapeshellcmd($bundle_tmp_file), escapeshellcmd($bundle_file));
+ } else {
+ exec("ln -s ".escapeshellcmd($bundle_tmp_file)." ".escapeshellcmd($crt_file));
+ }
+
/* we don't need to store it.
/* Update the DB of the (local) Server */
$app->db->query("UPDATE web_domain SET ssl_request = '', ssl_cert = '$ssl_cert', ssl_key = '$ssl_key' WHERE domain = '".$data['new']['domain']."'");