#Need help with reverse proxy caddy.

62 messages · Page 1 of 1 (latest)

nocturne terrace
#

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

lament meadowBOT
#

Project ID: N/A

edgy steppe
#

well lets see your caddyfile

nocturne terrace
#

Wait just a second

nocturne terrace
#

5ae38f48-1fba-45f4-8625-5c03d5b1a176

nocturne terrace
#

anyways

edgy steppe
#

have you read any of the caddy docs?

nocturne terrace
#

no i watched two videos

edgy steppe
#

for what version of caddy lol

nocturne terrace
edgy steppe
#
{
  auto_https off
}

:{$PORT} {
  // ...
}
#

but show me your dockerfile now please

nocturne terrace
edgy steppe
#

dont know, show me first

nocturne terrace
edgy steppe
#

remove second line

#

then youre good

nocturne terrace
#

what about from my dns?

#

look

#

i used ping caddy--- 🙂

edgy steppe
#

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

edgy steppe
nocturne terrace
#

to use it as a value

nocturne terrace
edgy steppe
edgy steppe
nocturne terrace
nocturne terrace
#

{"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

edgy steppe
#

show me your current caddyfile

nocturne terrace
#

wait

#

reverse_proxy /api/v1/user firebase-database-production.up.railway.app/api/v1/user:80```
#

last one used and made some sense

edgy steppe
#

i like how you havent even used the starter i gave you

nocturne terrace
#

returns ""

edgy steppe
#

still though

nocturne terrace
#

if u read logs

#

somehow it can't resolve ip address to reverse to that server

#

this is the log

#

this is the website and return

#

this is what it shall be

edgy steppe
nocturne terrace
edgy steppe
#
{
    auto_https off 
}

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

thank youuuuuuuu brody it is somehow working

#

thank you so much

edgy steppe
#

i read the docs

nocturne terrace
#

me too

edgy steppe
#

cap

nocturne terrace
#

🥹 i was gonna vote for you whenever there is some event of something
i changed my mind