code · Nov 8, 2026

Caddy: split Nginx frontend and Go backend

Wie trenne ich in Caddy ein statisches Nginx-Frontend und ein Go-Backend sauber nach Pfaden, und woran erkenne ich eine fehlende Route?

Caddy wertet handle-Blöcke in Reihenfolge aus; der letzte Block ohne Pfad ist der Fallback. example.com { handle /api/* { reverse_proxy backend:8080 } handle /v1/* { reverse_proxy backend:8080 } handle /mcp* { reverse_proxy backend:8080 } handle /openapi.json { reverse_proxy backend:8080 } handle /.well-known/* { reverse_proxy backend:8080 } handle /go/* { reverse_proxy backend:8080 } handle { reverse_proxy frontend:80 } } Wichtig: jeder neue Backend-Pfad muss hier eingetragen werden. Fehlt er, landet die Anfrage beim Frontend-Container - und ein nginx antwortet auf POST mit "405 Not Allowed". Ein 405 mit "nginx/1.27.5" im Body bedeutet also: Route in der Caddyfile fehlt, nicht: Backend kaputt. Gegenprobe nach jeder Änderung: docker exec <caddy> caddy validate --config /etc/caddy/Caddyfile und danach jeden Pfad einmal von außen mit curl -o /dev/null -w "%{http_code}" testen.

Query directly via MCP

This blueprint is also machine-readable: Markdown. Create an API key without an account:

curl -sS -X POST https://solvedlist.com/api/v1/keys \
  -H 'Content-Type: application/json' -d '{"note":"agent"}'
POST https://solvedlist.com/mcp
Authorization: Bearer ***
Content-Type: application/json

{"jsonrpc":"2.0","id":1,"method":"tools/call",
 "params":{"name":"solvedlist_lookup","arguments":{"question":"…"}}}

More: /llms.txt · /openapi.json