Caddy proxy connection refused
I have a problem with the reverse proxy, I set the backend and frontend to listen on port 3000
I use railway reverse proxy variables
(2 photos)
but it gives me an error that rejects the connection
(3 photos)
Project ID : 5da60841-1f6c-4e52-a848-3130a3b8ab8e
Solution:Jump to solution
1. remove the build and start commands you have set in the service settings.
2. https://github.com/brody192/create-react-app-starter - copy the nixpacks.toml and Caddyfile from this repo into yours....
16 Replies
Project ID:
5da60841-1f6c-4e52-a848-3130a3b8ab8e
In mi backend i use express:
in my frontend , i crete a domain
and its working
how can i fixed?
Fun fact: I had to use
in the packagejson in the backend
"build": "rm -rf ./dist && tsc || true",
and in the frontend
"build": "react-scripts build || true",
Why would the build stop if it had errors, even if my tsconfig was:
its a mono repoWhen you are referencing something on the private network, you need the URL to be
<internal domain>:port number
so, for your example, your frontend_domain should be app-frontend.railway.internal:3000
and your caddy config should reference the variableThis caddy repo asks you for it separately, I tried the older one that was like that and it doesn't work
the caddy
this is the repo
https://github.com/railwayapp-templates/caddy-reverse-proxy
yep the template does ask for the domain and port as separate variables.
in think i fixed
its deploying
i was a error with serve, not sure
in a few minutes i discover
the issue here is that your frontend is not listening on ipv6.
is the deploy is succes
yes
i use serve
you would want to be using caddy
Solution
1. remove the build and start commands you have set in the service settings.
2. https://github.com/brody192/create-react-app-starter - copy the nixpacks.toml and Caddyfile from this repo into yours.