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
Gonza•7mo 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•7mo ago
I would recommend doing that through cloudflare with a cloudflare tunnel
Gonza
Gonza•7mo 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•7mo ago
your services will need to listen on ipv6 and a fixed port the private network is ipv6 only
Gonza
Gonza•7mo ago
yes my proxy use :: and port 3000 cloudflare config
Brody
Brody•7mo ago
whats with the underscore
Gonza
Gonza•7mo ago
No description
Gonza
Gonza•7mo ago
internal service the name of service xd
Brody
Brody•7mo ago
what kind of proxy app?
Gonza
Gonza•7mo ago
simple http redirect to anothers service by certain conditions like a tenant template or admin etc
Brody
Brody•7mo ago
more specifically? something you coded? or nginx?
Gonza
Gonza•7mo ago
by subdomain or custom domain redirect to the service of tenant coded in express js
Brody
Brody•7mo ago
show me the app.listen
Gonza
Gonza•7mo ago
logs
No description
Gonza
Gonza•7mo ago
No description
Brody
Brody•7mo ago
is the cloudflare tunnel is the same project?
Gonza
Gonza•7mo ago
yes
Brody
Brody•7mo ago
its trying to dial port 80
Gonza
Gonza•7mo ago
how can i change port or i need to set host on port 80?
Brody
Brody•7mo ago
save this config that log isnt what we would want to be looking at
Gonza
Gonza•7mo ago
what can i do?
Brody
Brody•7mo ago
send all the logs okay try accessing it again
Gonza
Gonza•7mo ago
No description
Brody
Brody•7mo ago
and what do the logs say now scroll down?
Gonza
Gonza•7mo ago
i reload site and nothing
Brody
Brody•7mo ago
remove the underscore from everything to do with the proxy service
Gonza
Gonza•7mo ago
some i saw i dont create a private network on tunnel that can be a problem?
Gonza
Gonza•7mo ago
No description
Gonza
Gonza•7mo ago
i said nothing underscore removed and now works
Brody
Brody•7mo ago
awsome
Gonza
Gonza•7mo ago
😂
Brody
Brody•7mo ago
lessen learnt, dont give things strange names
Gonza
Gonza•7mo ago
thats name its only for get on top of monorepo, my bad! thx again brody!
Brody
Brody•7mo ago
no problem
Gonza
Gonza•7mo ago
for wildcard in cloudflare i need to do something?
Brody
Brody•7mo ago
i wouldnt know how thats done in cloudflare
Gonza
Gonza•7mo ago
i create a cname manually with * and works at leats something i can do and works xd
Brody
Brody•7mo ago
awsome
Want results from more Discord servers?
Add your server