crm.e-cosplay.fr {
    tls {
        dns cloudflare cfat_rIHZqzCm9GKK3xVnQDNGfu6J91TseIDdTKeuWSFUdf6ccd31
    }

    @static path /logo.png /favicon.ico /favicon.png /marker.png /screen.png /manifest.json /site.webmanifest /sw.js /unavailable.html /workbox/* /idb/* /build/* /uploads/* /pwa/*
    handle @static {
        root * /var/www/crm-crm-siteconseil/public
        file_server
    }

    @maintenance file /var/www/crm-siteconseil/public/.update
    handle @maintenance {
        root * /var/www/crm-siteconseil/public
        rewrite * /maintenance.html
        file_server {
            status 503
        }
    }

    handle {
        root * /var/www/crm-siteconseil/public
        php_fastcgi localhost:4568 localhost:4569 {
            root /app/public
            lb_policy round_robin
            trusted_proxies private_ranges
            dial_timeout 5s
            read_timeout 30s
            write_timeout 30s
        }
        file_server
        try_files {path} /index.php?{query}
    }

    handle_errors {
        @unavailable expression `{err.status_code} in [502, 503]`
        handle @unavailable {
            root * /var/www/crm-siteconseil/public
            rewrite * /unavailable.html
            file_server
        }
    }

    encode gzip

    header {
        -Server
    }

    log {
        output file /var/log/caddy/ticket.e-cosplay.fr.log
    }
}
