diff options
author | Alexandre Alouit <alexandre.alouit@gmail.com> | 2015-12-06 23:15:38 +0100 |
---|---|---|
committer | Alexandre Alouit <alexandre.alouit@gmail.com> | 2015-12-06 23:15:38 +0100 |
commit | 3d4bfa4de298331405f79a05863509968df35a75 (patch) | |
tree | 39ef208f4869f7202c6e52d26547f9843bf07832 /src/server | |
parent | ff1ec87918f6955393fe5b03f9bd85562006d29f (diff) | |
parent | f70e8aff9290e2d390fb799ea08c50ecb86d730d (diff) |
Merge pull request #8 from remmedia/ISPConfig-3.0.5.4p8
add chain to apache.
Diffstat (limited to 'src/server')
-rwxr-xr-x | src/server/plugins-available/apache2_plugin.inc.php | 15 |
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']."'"); |