Caddy erhält und erneuert Let's Encrypt-Zertifikate automatisch - keine Certbot-Timer, keine Config-Gymnastik. Prereq: Eine Domain mit einem A-Record, der auf Ihre VPS-IP verweist.
ssh root@YOUR_SERVER_IP
apt update && apt install -y caddy
# for the latest version consider the official caddy.com repo
mkdir -p /var/www/mysite
# from your computer:
scp -r ./dist/* root@YOUR_SERVER_IP:/var/www/mysite/
cat > /etc/caddy/Caddyfile <<'EOF'
mysite.com {
root * /var/www/mysite
encode gzip
file_server
}
EOF
systemctl reload caddy
Offen https://mysite.com Das Vorhängeschloss ist bereits da. Caddy hat das Zertifikat selbst ausgestellt und automatisch erneuert. SPA Routing? Addition try_files {path} /index.html Innerhalb des Site-Blocks.
Noch kein Server? A Buran-1 (€6.5/Monat) Hostet bequem mehrere Websites.