diff --git a/app/Helpers/SSH.php b/app/Helpers/SSH.php index 145418e..07ac112 100755 --- a/app/Helpers/SSH.php +++ b/app/Helpers/SSH.php @@ -94,12 +94,6 @@ public function connect(bool $sftp = false): void public function exec(string $command, string $log = '', ?int $siteId = null, ?bool $stream = false): string { if (! $this->log && $log) { - $this->log = $this->server->logs()->create([ - 'site_id' => $siteId, - 'name' => $this->server->id.'-'.strtotime('now').'-'.$log.'.log', - 'type' => $log, - 'disk' => config('core.logs_disk'), - ]); $this->log = ServerLog::make($this->server, $log); if ($siteId) { $this->log->forSite($siteId); diff --git a/app/SiteTypes/PHPBlank.php b/app/SiteTypes/PHPBlank.php index 36fa2d3..fd65b04 100755 --- a/app/SiteTypes/PHPBlank.php +++ b/app/SiteTypes/PHPBlank.php @@ -3,6 +3,7 @@ namespace App\SiteTypes; use App\Enums\SiteFeature; +use App\SSH\Services\Webserver\Webserver; use Illuminate\Validation\Rule; class PHPBlank extends PHPSite @@ -42,7 +43,9 @@ public function data(array $input): array public function install(): void { - $this->site->server->webserver()->handler()->createVHost($this->site); + /** @var Webserver $webserver */ + $webserver = $this->site->server->webserver()->handler(); + $webserver->createVHost($this->site); $this->progress(65); $this->site->php()?->restart(); } diff --git a/app/SiteTypes/PHPMyAdmin.php b/app/SiteTypes/PHPMyAdmin.php index 579efdd..8c25992 100755 --- a/app/SiteTypes/PHPMyAdmin.php +++ b/app/SiteTypes/PHPMyAdmin.php @@ -41,9 +41,12 @@ public function data(array $input): array public function install(): void { - $this->site->server->webserver()->handler()->createVHost($this->site); + /** @var Webserver $webserver */ + $webserver = $this->site->server->webserver()->handler(); + $webserver->createVHost($this->site); $this->progress(30); app(\App\SSH\PHPMyAdmin\PHPMyAdmin::class)->install($this->site); $this->progress(65); + $this->site->php()?->restart(); } } diff --git a/app/SiteTypes/PHPSite.php b/app/SiteTypes/PHPSite.php index b7823e6..2ee9e2a 100755 --- a/app/SiteTypes/PHPSite.php +++ b/app/SiteTypes/PHPSite.php @@ -68,7 +68,9 @@ public function data(array $input): array */ public function install(): void { - $this->site->server->webserver()->handler()->createVHost($this->site); + /** @var Webserver $webserver */ + $webserver = $this->site->server->webserver()->handler(); + $webserver->createVHost($this->site); $this->progress(15); $this->deployKey(); $this->progress(30); diff --git a/app/SiteTypes/Wordpress.php b/app/SiteTypes/Wordpress.php index 38d27fa..61d74e4 100755 --- a/app/SiteTypes/Wordpress.php +++ b/app/SiteTypes/Wordpress.php @@ -81,7 +81,9 @@ public function data(array $input): array public function install(): void { - $this->site->server->webserver()->handler()->createVHost($this->site); + /** @var Webserver $webserver */ + $webserver = $this->site->server->webserver()->handler(); + $webserver->createVHost($this->site); $this->progress(30); /** @var Database $database */ $database = app(CreateDatabase::class)->create($this->site->server, [ diff --git a/resources/views/sites/partials/create/phpmyadmin.blade.php b/resources/views/sites/partials/create/phpmyadmin.blade.php index 911e8c0..c7f06c1 100644 --- a/resources/views/sites/partials/create/phpmyadmin.blade.php +++ b/resources/views/sites/partials/create/phpmyadmin.blade.php @@ -5,7 +5,6 @@ - @error("version")