Update ApacheWebsiteCreate.php
This commit is contained in:
parent
96a27d3980
commit
6904a51da7
1 changed files with 19 additions and 4 deletions
|
@ -12,6 +12,7 @@ class ApacheWebsiteCreate
|
|||
public $user;
|
||||
public $email;
|
||||
public $password;
|
||||
public $isMainDomain = false;
|
||||
public $additionalServices = [];
|
||||
public $features = [];
|
||||
|
||||
|
@ -45,6 +46,11 @@ class ApacheWebsiteCreate
|
|||
$this->features = $features;
|
||||
}
|
||||
|
||||
public function setIsMainDomain($isMainDomain)
|
||||
{
|
||||
$this->isMainDomain = $isMainDomain;
|
||||
}
|
||||
|
||||
public function handle()
|
||||
{
|
||||
$getLinuxUser = new GetLinuxUser();
|
||||
|
@ -55,10 +61,19 @@ class ApacheWebsiteCreate
|
|||
return false;
|
||||
}
|
||||
|
||||
$allDomainsRoot = '/home/'.$this->user.'/domains';
|
||||
$domainRoot = '/home/'.$this->user.'/domains/'.$this->domain;
|
||||
$domainPublic = $domainRoot . '/public_html';
|
||||
$homeRoot = '/home/'.$this->user;
|
||||
if ($this->isMainDomain) {
|
||||
$allDomainsRoot = '/home/' . $this->user . '/public_html';
|
||||
$domainRoot = '/home/' . $this->user;
|
||||
$domainPublic = '/home/' . $this->user . '/public_html';
|
||||
$homeRoot = '/home/' . $this->user;
|
||||
} else {
|
||||
$allDomainsRoot = '/home/' . $this->user . '/domains';
|
||||
$domainRoot = '/home/' . $this->user . '/domains/' . $this->domain;
|
||||
$domainPublic = $domainRoot . '/public_html';
|
||||
$homeRoot = '/home/' . $this->user;
|
||||
}
|
||||
|
||||
|
||||
|
||||
$apacheVirtualHostConfigs = app()->virtualHostManager->getConfigs($this->additionalServices);
|
||||
|
||||
|
|
Loading…
Reference in a new issue