SOLVED: caddy reverse proxy error 502 (can't find host)
Hi,
I am trying to setup a caddy reverse proxy.
caddyfile
proxy env vars:
My main focus now is the API
the API is listening to :::3000 (this is working)
When I go to my domain /api
I get error 502
9 Replies
Project ID:
1aa4380a-1423-4392-a56a-2d49595fe43e
1aa4380a-1423-4392-a56a-2d49595fe43e
with Nginx i get this
what type of app is the backend/api ?
It's expressjs (and react)
However, I managed to get it working with this caddy config:
With these env vars:
For other people with a similar issue ^
haha glad you could solve, now its closer to the original caddyfile i wrote
Yes, though I think the main issue were the ENV vars, as I tried countless caddyfile variations π
It wouldn't work with
http(s)://
and/or railway.internal
in thereit would have, you just left out the
/api/*
partI tried redirecting all traffic to the api instead, which also only would work without railway.internal. Don't ask me why π¦
sounds good