[
{
"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
}
]