🧩 Caddy Studio · sandboxed demo · Apply targets a throwaway Caddy, never production
Caddy Studio 7 route(s)
🖥️ Server
Routes
🌐 Route
Target
Matchers
Route
🎯 Upstream
Upstream
🌐 Route
Target
Matchers
Route
🗜️ Compression
Next
Handler
⚖️ Load Balancer
Upstream 1
Upstream 2
Balanced
🎯 Upstream
Upstream
🎯 Upstream
Upstream
🛣️ Path matcher
Matcher
🌐 Route
Target
Matchers
Route
🔒 Basic auth
Next
Handler
📁 File server
Handler
🔧 Method matcher
Matcher
🌐 Route
Target
Matchers
Route
↪️ Redirect
Redirect
🌐 Route
Target
Matchers
Route
🚦 Rate limit
Next
Handler
🐘 PHP / FastCGI
Handler
🌐 Route
Target
Matchers
Route
📄 Static response
Handler
🌐 Route
Target
Matchers
Route
🔀 Subroute
Inner routes
Handler
🌐 Route
Target
Matchers
Route
🎯 Upstream
Upstream
🛣️ Path matcher
Matcher
🔒 TLS · ACME (public)
🏠 TLS · Internal
🦆 TLS · DuckDNS
DNS credential
🔑 DNS Credential
Credential
☁️ TLS · Cloudflare DNS
DNS credential
🔑 DNS Credential
Credential
📄 TLS · Custom cert
Compiled Caddy JSON
[
    {
        "match": [
            {
                "host": [
                    "studio.logged.cloud"
                ]
            }
        ],
        "handle": [
            {
                "handler": "reverse_proxy",
                "upstreams": [
                    {
                        "dial": "10.0.0.200:8107"
                    }
                ]
            }
        ],
        "terminal": true
    },
    {
        "match": [
            {
                "host": [
                    "app.example.com"
                ],
                "path": [
                    "/api/*"
                ]
            }
        ],
        "handle": [
            {
                "handler": "encode",
                "encodings": {
                    "gzip": {},
                    "zstd": {}
                }
            },
            {
                "handler": "reverse_proxy",
                "upstreams": [
                    {
                        "dial": "10.0.0.10:80"
                    },
                    {
                        "dial": "10.0.0.11:80"
                    }
                ],
                "load_balancing": {
                    "selection_policy": {
                        "policy": "least_conn"
                    }
                }
            }
        ],
        "terminal": true
    },
    {
        "match": [
            {
                "host": [
                    "secret.example.com"
                ],
                "method": [
                    "GET",
                    "HEAD"
                ]
            }
        ],
        "handle": [
            {
                "handler": "authentication",
                "providers": {
                    "http_basic": {
                        "accounts": [
                            {
                                "username": "admin",
                                "password": "$2a$14$ajq8Q7fbtFRQvXpHphSceOuw7H0bMlPj0qZ8N3kLp3W2vF1qkChGy"
                            }
                        ]
                    }
                }
            },
            {
                "handler": "file_server",
                "root": "/srv/secret",
                "browse": {}
            }
        ],
        "terminal": true
    },
    {
        "match": [
            {
                "host": [
                    "example.com"
                ]
            }
        ],
        "handle": [
            {
                "handler": "static_response",
                "status_code": 308,
                "headers": {
                    "Location": [
                        "https://www.example.com{http.request.uri}"
                    ]
                }
            }
        ],
        "terminal": true
    },
    {
        "match": [
            {
                "host": [
                    "api.example.com"
                ]
            }
        ],
        "handle": [
            {
                "handler": "rate_limit",
                "rate": "100r/m"
            },
            {
                "handler": "reverse_proxy",
                "transport": {
                    "protocol": "fastcgi",
                    "split_path": [
                        ".php"
                    ]
                },
                "upstreams": [
                    {
                        "dial": "php-fpm:9000"
                    }
                ]
            }
        ],
        "terminal": true
    },
    {
        "match": [
            {
                "host": [
                    "health.logged.cloud"
                ]
            }
        ],
        "handle": [
            {
                "handler": "static_response",
                "status_code": 200,
                "body": "OK"
            }
        ],
        "terminal": true
    },
    {
        "match": [
            {
                "host": [
                    "ws.example.com"
                ]
            }
        ],
        "handle": [
            {
                "handler": "subroute",
                "routes": [
                    {
                        "match": [
                            {
                                "path": [
                                    "/ws/*"
                                ]
                            }
                        ],
                        "handle": [
                            {
                                "handler": "reverse_proxy",
                                "upstreams": [
                                    {
                                        "dial": "10.0.0.200:5173"
                                    }
                                ]
                            }
                        ]
                    }
                ]
            }
        ],
        "terminal": true
    }
]