R
Railway•8mo ago
Gonza

How can i handle multiple domains dynamic?

I need to register domain to my proxy service when a tenant register and configure their domain
39 Replies
Brody
Brody•8mo ago
You would want to utilize wildcard domains - https://docs.railway.app/guides/public-networking#wildcard-domains
Gonza
GonzaOP•8mo ago
Im use wildcard for tenants that not have domains. Example tenant.myweb.com. But how can i handle for a custom domain that tenant have dynamically or by code for example tenantdomain.com -> myProxyService
Brody
Brody•8mo ago
I would recommend doing that through cloudflare with a cloudflare tunnel
Gonza
GonzaOP•8mo ago
ok thx i never use cloudflare im going to learn @Brody Hi brody sorry the mention, i created a tunner and deploy the cloudflare tunnel connection on railway "cf-tunnel" but i cant connect over private networks to service i configure through http
Brody
Brody•8mo ago
your services will need to listen on ipv6 and a fixed port the private network is ipv6 only
Gonza
GonzaOP•8mo ago
yes my proxy use :: and port 3000 cloudflare config
Brody
Brody•8mo ago
whats with the underscore
Gonza
GonzaOP•8mo ago
No description
Gonza
GonzaOP•8mo ago
internal service the name of service xd
Brody
Brody•8mo ago
what kind of proxy app?
Gonza
GonzaOP•8mo ago
simple http redirect to anothers service by certain conditions like a tenant template or admin etc
Brody
Brody•8mo ago
more specifically? something you coded? or nginx?
Gonza
GonzaOP•8mo ago
by subdomain or custom domain redirect to the service of tenant coded in express js
Brody
Brody•8mo ago
show me the app.listen
Gonza
GonzaOP•8mo ago
logs
No description
Gonza
GonzaOP•8mo ago
No description
Brody
Brody•8mo ago
is the cloudflare tunnel is the same project?
Gonza
GonzaOP•8mo ago
yes
Brody
Brody•8mo ago
its trying to dial port 80
Gonza
GonzaOP•8mo ago
how can i change port or i need to set host on port 80?
Brody
Brody•8mo ago
save this config that log isnt what we would want to be looking at
Gonza
GonzaOP•8mo ago
what can i do?
Brody
Brody•8mo ago
send all the logs okay try accessing it again
Gonza
GonzaOP•8mo ago
No description
Brody
Brody•8mo ago
and what do the logs say now scroll down?
Gonza
GonzaOP•8mo ago
i reload site and nothing
Brody
Brody•8mo ago
remove the underscore from everything to do with the proxy service
Gonza
GonzaOP•8mo ago
some i saw i dont create a private network on tunnel that can be a problem?
Gonza
GonzaOP•8mo ago
No description
Gonza
GonzaOP•8mo ago
i said nothing underscore removed and now works
Brody
Brody•8mo ago
awsome
Gonza
GonzaOP•8mo ago
😂
Brody
Brody•8mo ago
lessen learnt, dont give things strange names
Gonza
GonzaOP•8mo ago
thats name its only for get on top of monorepo, my bad! thx again brody!
Brody
Brody•8mo ago
no problem
Gonza
GonzaOP•8mo ago
for wildcard in cloudflare i need to do something?
Brody
Brody•8mo ago
i wouldnt know how thats done in cloudflare
Gonza
GonzaOP•8mo ago
i create a cname manually with * and works at leats something i can do and works xd
Brody
Brody•8mo ago
awsome
Want results from more Discord servers?
Add your server