Skip to content

Caddy web server config

Robert Isoski edited this page May 22, 2022 · 3 revisions

Add your hostname and web root to the Caddy configuration. Replace the example.com with your actual domain and the root path with your actual path where WonderCMS is installed.

example.com {
    root * /var/www/wondercms
    file_server

    respond /cache.json 403
    respond /database.js 403

    try_files {path} {path}/ /index.php?page={http.request.orig_uri.path.file}&{query}

    php_fastcgi unix//var/run/php/php7.4-fpm.sock
}

Thanks to Prophet-Phoenix and @francislavoie.

Clone this wiki locally