This is an updated Caddy file for Flarum 0.1.0-beta.8

www.example.com {
    root /var/www/flarum/public
    rewrite {
        to {path} {path}/ /index.php
    }
    fastcgi / /var/run/php/php7.2-fpm.sock php
    header /assets {
        +Cache-Control "public, must-revalidate, proxy-revalidate"
        +Cache-Control "max-age=25000"
        Pragma "public" 
    }
    gzip
}

This configuration does not require any special caddy extensions and works perfectly.

    Franz I certainly agree that it would be nice if they all just used the same format, unfortunately, I don't think that will ever happen. Nginx was my favorite until I found caddy, the simple config plus the automatic HTTPs and extremely fast response times lead me to change all my sites to it. I'm still waiting on TLS1.3 support though (they are waiting on the next version of Go to be released)

      7 months later

      Just a quick update this config continues to operate for Beta 9 (and dev-master). Something I should note is that there is a random extra comma both in my original post and the documentation (which I'm the one at fault for). I've made a pull request to get the documentation fixed, and I've updated the original post to remove said extra comma.