Created
September 30, 2025 03:13
-
-
Save 17twenty/51e26a1b3b6de4bf4f561d0d4d9a3a63 to your computer and use it in GitHub Desktop.
If you have Cloudflared, you can setup your `*` wildcard record and point it at caddy running on your local box.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Globals for logging and turning off https | |
| # Read the following next time experimenting | |
| # https://pratikpc.medium.com/using-caddy-to-create-virtual-hosts-for-your-multi-domain-names-as-a-reverse-proxy-from-a-single-2ce0b7a53a9e | |
| # Dont forget | |
| # caddy fmt --overwrite && caddy reload | |
| { | |
| auto_https off | |
| } | |
| curiola.com:80 { | |
| log { | |
| output stdout | |
| } | |
| redir https://www.curiola.com{uri} permanent | |
| } | |
| www.curiola.com:80 { | |
| log { | |
| output stdout | |
| } | |
| root * /Users/nickglynn/Sites/www.curiola.com/output | |
| file_server | |
| } | |
| # :8001 { | |
| # # Two upstreams, but more coolness here | |
| # reverse_proxy localhost:9001 localhost:9002 { | |
| # lb_policy round_robin | |
| # lb_try_interval 1s | |
| # lb_try_duration 30s | |
| # health_uri /healthcheck | |
| # health_interval 5s | |
| # } | |
| # } | |
| # Specific tunnel - needs Cloudflared config | |
| :8001 { | |
| reverse_proxy localhost:9701 { | |
| health_uri /healthcheck | |
| health_interval 5s | |
| } | |
| } | |
| # Named host | |
| timstack.curiola.com:80 { | |
| log { | |
| output stdout | |
| } | |
| reverse_proxy 0.0.0.0:3001 | |
| } | |
| brandpack.curiola.com:80 { | |
| log { | |
| output stdout | |
| } | |
| reverse_proxy 0.0.0.0:9060 | |
| } | |
| :80 { | |
| respond "Not Found" 404 | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
| CNAME | * | {tunnel_id}.cfargotunnel.com |
Make sure that proxied is on (orange cloud)
Cloudflare will terminate DNS at their edge and then forward traffic through your tunnel.
Without proxying, the *.cfargotunnel.com record won’t route requests through the tunnel properly.