Files
vito/resources/views/ssh/services/webserver/caddy/change-php-version.blade.php
Rasel Islam Rafi 2318e1b1df 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
2025-05-29 11:25:36 +02:00

10 lines
278 B
PHP
Executable File

if ! sudo sed -i 's/php{{ $oldVersion }}/php{{ $newVersion }}/g' /etc/caddy/sites-available/{{ $domain }}; then
echo 'VITO_SSH_ERROR' && exit 1
fi
if ! sudo service caddy restart; then
echo 'VITO_SSH_ERROR' && exit 1
fi
echo "PHP Version Changed to {{ $newVersion }}"