Skip to content

Instantly share code, notes, and snippets.

@ssv445
Created July 1, 2022 04:08
Show Gist options
  • Select an option

  • Save ssv445/b1ae5af56b1ef11ac178c3ff413a8f84 to your computer and use it in GitHub Desktop.

Select an option

Save ssv445/b1ae5af56b1ef11ac178c3ff413a8f84 to your computer and use it in GitHub Desktop.

Revisions

  1. ssv445 created this gist Jul 1, 2022.
    25 changes: 25 additions & 0 deletions caddy.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    # for checking if it belongs ot our domain list
    {
    email myemail@example.test
    on_demand_tls {
    ask https://api.example.test/check-domain
    interval 2m
    burst 5
    }
    }

    # for specific domains
    app.example.test {
    reverse_proxy xxx.xxx.xxx.xxx:4000
    }

    # for any domains
    https:// {
    tls {
    on_demand
    }

    handle {
    reverse_proxy xxx.xxx.xxx.xxx:5000
    }
    }