Managing web servers can be kind of tricky, and with an increasing number of applications in one server, managing all of their configuration files can start to feel like a burden 🥴. Caddy manages this for me automatically 💖.

#getting-started-with-caddyFirst, you need to install Caddy on your server (obviously), you can find a pretty detailed guide on https://caddyserver.com/docs/.

Let’s take a moment and think of what we need to tell Caddy about our Laravel application: It should use HTTPS.

So, I present to you the Caddy 2 template I use for Laravel: my-website.com { # Resolve the root directory for the app root * /var/www/my-website/public
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners