R
Railway•12mo ago
Pythonic Shit

Need help with reverse proxy caddy.

I get an error while trying to confugure my reverse proxy on railway Getting errros like : invalide response from http://hcn1.net/.well-known ... And apparently i failed to configure dns on my domain
41 Replies
Percy
Percy•12mo ago
Project ID: N/A
Brody
Brody•12mo ago
well lets see your caddyfile
Pythonic Shit
Pythonic Shit•12mo ago
Wait just a second
Pythonic Shit
Pythonic Shit•12mo ago
Pythonic Shit
Pythonic Shit•12mo ago
5ae38f48-1fba-45f4-8625-5c03d5b1a176 5ae38f48-1fba-45f4-8625-5c03d5b1a176 anyways
Brody
Brody•12mo ago
have you read any of the caddy docs?
Pythonic Shit
Pythonic Shit•12mo ago
no i watched two videos
Brody
Brody•12mo ago
for what version of caddy lol
Pythonic Shit
Pythonic Shit•12mo ago
2. something 😢
Brody
Brody•12mo ago
{
auto_https off
}

:{$PORT} {
// ...
}
{
auto_https off
}

:{$PORT} {
// ...
}
but show me your dockerfile now please
Pythonic Shit
Pythonic Shit•12mo ago
i gotta change that too?
Brody
Brody•12mo ago
dont know, show me first
Pythonic Shit
Pythonic Shit•12mo ago
Brody
Brody•12mo ago
remove second line then youre good
Pythonic Shit
Pythonic Shit•12mo ago
what about from my dns?
Pythonic Shit
Pythonic Shit•12mo ago
Pythonic Shit
Pythonic Shit•12mo ago
look i used ping caddy--- 🙂
Brody
Brody•12mo ago
well you would need to remove that custom domain from whatever railway service it used to be on, and move it to the daddy service, and then youd get a new cname to use, but dont do that yet, just use the railway domain until you have it working dont know what thats for
Pythonic Shit
Pythonic Shit•12mo ago
for ip address to use it as a value may i tag you if i encounter any issue?
Brody
Brody•12mo ago
dont do that, use cnames, but again, just use the railway domain until you have it working nope, just send a message here, i have eyes after all
Pythonic Shit
Pythonic Shit•12mo ago
alright i got it no problem thank you brody u so helpful {"level":"error","ts":1689279176.6590822,"logger":"http.log.error","msg":"dial firebase-database-production.up.railway.app: unknown network firebase-database-production.up.railway.app","request":{"remote_ip":"192.168.0.4","remote_port":"35726","proto":"HTTP/1.1","method":"GET","host":"caddy-production-9488.up.railway.app","uri":"/api/v1/user","headers":{"X-Forwarded-For":["105.235.132.85"],"X-Envoy-External-Address":["105.235.132.85"],"X-Request-Id":["d991c868-3ef3-4e9d-bf35-97f2330bd4b5"],"Accept-Encoding":["gzip, deflate"],"X-Forwarded-Proto":["https"],"User-Agent":["python-requests/2.28.1"],"Accept":["/"]}},"duration":0.00034462,"status":502,"err_id":"n8q2v8hur","err_trace":"reverseproxy.statusError (reverseproxy.go:1299)"} after trying billions of configs and reading dos this is still the error
Brody
Brody•12mo ago
show me your current caddyfile
Pythonic Shit
Pythonic Shit•12mo ago
wait
:{$PORT}

reverse_proxy /api/v1/user firebase-database-production.up.railway.app/api/v1/user:80
:{$PORT}

reverse_proxy /api/v1/user firebase-database-production.up.railway.app/api/v1/user:80
last one used and made some sense
Brody
Brody•12mo ago
i like how you havent even used the starter i gave you
Pythonic Shit
Pythonic Shit•12mo ago
i used it swear to god but same issue returns ""
Brody
Brody•12mo ago
still though
Pythonic Shit
Pythonic Shit•12mo ago
man i used it and it kepts making errors i am sorry if u read logs somehow it can't resolve ip address to reverse to that server
Pythonic Shit
Pythonic Shit•12mo ago
this is the log
Pythonic Shit
Pythonic Shit•12mo ago
Pythonic Shit
Pythonic Shit•12mo ago
this is the website and return
Pythonic Shit
Pythonic Shit•12mo ago
Pythonic Shit
Pythonic Shit•12mo ago
this is what it shall be
Pythonic Shit
Pythonic Shit•12mo ago
alright and how did u do that
Brody
Brody•12mo ago
{
auto_https off
}

:{$PORT} {
reverse_proxy /api/v1/user https://firebase-database-production.up.railway.app {
header_up Host {upstream_hostport}
}
}
{
auto_https off
}

:{$PORT} {
reverse_proxy /api/v1/user https://firebase-database-production.up.railway.app {
header_up Host {upstream_hostport}
}
}
Pythonic Shit
Pythonic Shit•12mo ago
thank you i'll try itt thank youuuuuuuu brody it is somehow working thank you so much
Brody
Brody•12mo ago
i read the docs
Pythonic Shit
Pythonic Shit•12mo ago
me too
Brody
Brody•12mo ago
cap
Pythonic Shit
Pythonic Shit•12mo ago
🥹 i was gonna vote for you whenever there is some event of something i changed my mind
Brody
Brody•12mo ago
lmao