diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index fbf91b9e00d2f1d19bee26110c51e65467ace0cb..eacf9434829db69087edf2df5b9efb5d4c1cd587 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -190,7 +190,7 @@ class apache2_plugin { //* Save a SSL certificate to disk if($data["new"]["ssl_action"] == 'save') { $ssl_dir = $data["new"]["document_root"]."/ssl"; - $domain = $data["new"]["ssl_domain"]; + $domain = ($data["new"]["ssl_domain"] != '')?$data["new"]["ssl_domain"]:$data["new"]["domain"]; $csr_file = $ssl_dir.'/'.$domain.".csr"; $crt_file = $ssl_dir.'/'.$domain.".crt"; $bundle_file = $ssl_dir.'/'.$domain.".bundle"; @@ -207,7 +207,7 @@ class apache2_plugin { //* Delete a SSL certificate if($data['new']['ssl_action'] == 'del') { $ssl_dir = $data['new']['document_root'].'/ssl'; - $domain = $data['new']['ssl_domain']; + $domain = ($data["new"]["ssl_domain"] != '')?$data["new"]["ssl_domain"]:$data["new"]["domain"]; $csr_file = $ssl_dir.'/'.$domain.'.csr'; $crt_file = $ssl_dir.'/'.$domain.'.crt'; $bundle_file = $ssl_dir.'/'.$domain.'.bundle'; @@ -228,7 +228,6 @@ class apache2_plugin { $app->log('Deleting SSL Cert for: '.$domain,LOGLEVEL_DEBUG); } - }