diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 25564686748aced189c28bc6322dd12162239f22..0265c34202acd0f960e1442d54c8f96b2d1e3a4d 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -1222,7 +1222,7 @@ class apache2_plugin { // check if domains are reachable to avoid letsencrypt verification errors $le_rnd_file = uniqid('le-') . '.txt'; $le_rnd_hash = md5(uniqid('le-', true)); - mkdir('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/',0750,true); + if(!is_dir('/usr/local/interface/acme/.well-known/acme-challenge/'))mkdir('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/',0755,true); file_put_contents('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/' . $le_rnd_file, $le_rnd_hash); $le_domains = array(); diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index 55d2b19151f72cd10963a79bbc6d2c33a614ffdb..d114519f62e052449040aacd981a2eaf185b2ff7 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -1295,8 +1295,9 @@ class nginx_plugin { // check if domains are reachable to avoid letsencrypt verification errors $le_rnd_file = uniqid('le-') . '.txt'; $le_rnd_hash = md5(uniqid('le-', true)); + if(!is_dir('/usr/local/interface/acme/.well-known/acme-challenge/'))mkdir('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/',0755,true); file_put_contents('/usr/local/ispconfig/interface/acme/.well-known/acme-challenge/' . $le_rnd_file, $le_rnd_hash); - + $le_domains = array(); foreach($temp_domains as $temp_domain) { $le_hash_check = trim(@file_get_contents('http://' . $temp_domain . '/.well-known/acme-challenge/' . $le_rnd_file));