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

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners