mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-06 16:32:35 +00:00
Add Caddy Server Support Alongside Nginx (#600)
* added enum * add config for caddy * add svg icon * add caddy service class * wip * install caddy * create base Caddyfile with common snippets * Create a systemd service to run Caddy in the background. * create uninstall file * wip * create path * create vhost * get vhost * delete site * add php version change file * add custom ssl * create redirect file * add vhost for caddy site & load balancer * update svg * fix caddy icon * fix style * add systemctl reload method * Reload systemd after modifying the Caddy service file. * add caddy * added tests * format with pint * prevent multiple web server installations * added error log & access log
This commit is contained in:
@ -6,7 +6,6 @@
|
||||
use App\Exceptions\SSLCreationException;
|
||||
use App\Models\Site;
|
||||
use App\Models\Ssl;
|
||||
use Closure;
|
||||
use Throwable;
|
||||
|
||||
class Nginx extends AbstractWebserver
|
||||
@ -34,21 +33,6 @@ public function install(): void
|
||||
$this->service->server->os()->cleanup();
|
||||
}
|
||||
|
||||
public function deletionRules(): array
|
||||
{
|
||||
return [
|
||||
'service' => [
|
||||
function (string $attribute, mixed $value, Closure $fail): void {
|
||||
$hasSite = $this->service->server->sites()
|
||||
->exists();
|
||||
if ($hasSite) {
|
||||
$fail('Cannot uninstall webserver while you have websites using it.');
|
||||
}
|
||||
},
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws SSHError
|
||||
*/
|
||||
|
Reference in New Issue
Block a user