Carlos Aguni

Highly motivated self-taught IT analyst. Always learning and ready to explore new skills. An eternal apprentice.


Using Caddy as Reverse Proxy

10 May 2020 » linux

https://www.reddit.com/r/selfhosted/comments/gdftii/caddy_2_the_reverse_proxywebserver_with_automatic/

Example

book.{$MY_DOMAIN} {
    reverse_proxy bookstack:80
}

grafana.{$MY_DOMAIN} {
    reverse_proxy grafana:3000
}

:9090 {
    reverse_proxy prometheus:9090
}

Basic Auth

caddy hash-password <yourpassword>
url {
    basicauth {
        <username> <hashedpassword>
    }
    reverse_proxy <hostname:port>
}

Related Posts