A production-ready Caddyfile, probably
This project is inspired by h5bp/server-configs-apache and h5bp/server-configs-nginx.
I'd like to to provide a ready to go Caddy configuration, in form of a Caddyfile.
Before using this configuration snippet, please make sure you're familiar with how to use a Caddyfile
.
I strongly recommend that you at least read the Getting Started Guide of Caddy, Getting Started — Caddy Documentation (caddyserver.com).
The Caddyfile's structure can be described visually:
Further information can be found here: Caddyfile Concepts — Caddy Documentation (caddyserver.com)
By default, PHP implementation is not configured in this Caddyfile, due to different use-cases among users. If you'd like to implement PHP, please refer to Common Caddyfile Patterns — Caddy Documentation (caddyserver.com) Here is a sample snippet you could use:
(php82) {
encode gzip
php_fastcgi unix//run/php/php8.2-fpm.sock
}