mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-09-19 23:31:12 +00:00
update
This commit is contained in:
parent
fc22ab52b2
commit
54ef686de6
|
@ -30,8 +30,9 @@ class RunDomainRepair extends Command
|
||||||
if ($getAllDomains->count() > 0) {
|
if ($getAllDomains->count() > 0) {
|
||||||
foreach ($getAllDomains as $domain) {
|
foreach ($getAllDomains as $domain) {
|
||||||
$this->info('Repair domain: ' . $domain->domain);
|
$this->info('Repair domain: ' . $domain->domain);
|
||||||
$domain->configureVirtualHost();
|
$domain->configureVirtualHost(false);
|
||||||
}
|
}
|
||||||
|
shell_exec('service apache2 restart');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ class Domain extends Model
|
||||||
return $this->belongsTo(HostingSubscription::class);
|
return $this->belongsTo(HostingSubscription::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function configureVirtualHost()
|
public function configureVirtualHost($reloadApache = true)
|
||||||
{
|
{
|
||||||
$findHostingSubscription = \App\Models\HostingSubscription::where('id', $this->hosting_subscription_id)
|
$findHostingSubscription = \App\Models\HostingSubscription::where('id', $this->hosting_subscription_id)
|
||||||
->first();
|
->first();
|
||||||
|
@ -299,8 +299,9 @@ class Domain extends Model
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reload apache
|
// Reload apache
|
||||||
|
if ($reloadApache) {
|
||||||
shell_exec('systemctl reload apache2');
|
shell_exec('systemctl reload apache2');
|
||||||
|
}
|
||||||
$catchMainDomain = '';
|
$catchMainDomain = '';
|
||||||
$domainExp = explode('.', $this->domain);
|
$domainExp = explode('.', $this->domain);
|
||||||
if (count($domainExp) > 0) {
|
if (count($domainExp) > 0) {
|
||||||
|
@ -377,7 +378,9 @@ class Domain extends Model
|
||||||
shell_exec('ln -s /etc/apache2/sites-available/'.$this->domain.'-ssl.conf /etc/apache2/sites-enabled/'.$this->domain.'-ssl.conf');
|
shell_exec('ln -s /etc/apache2/sites-available/'.$this->domain.'-ssl.conf /etc/apache2/sites-enabled/'.$this->domain.'-ssl.conf');
|
||||||
|
|
||||||
// Reload apache
|
// Reload apache
|
||||||
|
if ($reloadApache) {
|
||||||
shell_exec('systemctl reload apache2');
|
shell_exec('systemctl reload apache2');
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue