User Tools

Site Tools


terminal:caddy

caddy notes

static site:

https://example.com {
        root * "/path/to/dir"
        file_server
}

file browse

https://example.com {
    root * "/path/to/dir"
    file_server browse
}

file browse: grid default/forced view

https://example.com {
    root * "/path/to/dir"
    file_server browse

    @directories `path('*/') && {query} == ''`
        redir @directories ?layout=grid
}

reverse proxy:

https://example.com {
        reverse_proxy 192.168.1.123:8080
}

reverse proxy with basic auth:

https://example.com {
        reverse_proxy 192.168.1.123:8080
        basicauth /* {
                username basicauth_hash
        }

}
htpasswd -nbBC 10 username password_to_be_hashed
terminal/caddy.txt ยท Last modified: 2024/09/06 18:08 by melo

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki