diff --git a/web/app/Models/Domain.php b/web/app/Models/Domain.php index 5077675..853c09f 100644 --- a/web/app/Models/Domain.php +++ b/web/app/Models/Domain.php @@ -298,10 +298,6 @@ class Domain extends Model } } - // Reload apache - if ($reloadApache) { - shell_exec('systemctl reload apache2'); - } $catchMainDomain = ''; $domainExp = explode('.', $this->domain); if (count($domainExp) > 0) { @@ -377,14 +373,15 @@ class Domain extends Model file_put_contents('/etc/apache2/sites-available/'.$this->domain.'-ssl.conf', $apacheBaseConfigWithSSL); shell_exec('ln -s /etc/apache2/sites-available/'.$this->domain.'-ssl.conf /etc/apache2/sites-enabled/'.$this->domain.'-ssl.conf'); - // Reload apache - if ($reloadApache) { - shell_exec('systemctl reload apache2'); - } } } + // Reload apache + if ($reloadApache) { + shell_exec('systemctl reload apache2'); + } + } }