Nginx reverse proxy with Railway public URL
raineking
PROOP

a year ago

hey! i am using the nginx proxy manager template https://railway.com/new/template/vXq1Wp to add a reverse proxy infront of my nextjs app to restrict access to my endpoints.

we've been using the public railway url (up.railway.app) to access the webapp and was wondering if it's possible to use that url as the domain name in the proxy host or if i need to get a custom domain - i haven't been able to get it to work with the public (up.railway.app) url

Solved$10 Bounty

23 Replies

raineking
PROOP

a year ago

f0eed4f7-b320-494d-82ed-895da4afb9be


raineking
PROOP

a year ago

looks like the answer was removed here. was there something wrong with the answer or was it removed by accident?


a year ago

It looked like an AI generated answer to me.


raineking
PROOP

a year ago

ah gotcha


raineking
PROOP

a year ago

but regarding above -- i can't use the public railway url (up.railway.app) for the domain name in the proxy host and would need to use a custom domain right?


a year ago

I'm sorry, I'm not familiar with the NGINX proxy manager, I will need to let the community step in to help you here.


a year ago

hey, Railway domains should work just fine with any reverse proxy


raineking
PROOP

a year ago

would i put the public railway url under "Domain Names" and put the internal private networking url under forward hostname/IP?

1385470405879402496


raineking
PROOP

a year ago

i tried that but it didn't work - would i need to remove the public url from my app's container?


a year ago

Yep your public domain needs to be attached to the Nginx service.


a year ago

afaik you can remove the domain from your webapp and then add it again to the Nginx one


a year ago

like when you generate a domain, you can edit the generated domain so just edit it to be the same as your webapp domain


a year ago

unfortunately a downtime will be required for that.


raineking
PROOP

a year ago

when you say "same as your webapp domain" do you mean the custom domain for my webapp?


raineking
PROOP

a year ago

cause i don't have one i've just been using the railway up.railway.app to access my webapp


a year ago

the up.railway.app can be modified to be anything you want

1385471807477514250


a year ago

the flow would be

1 - remove the railway domain from your webapp service

2 - add a domain to your Nginx service and edit it to match the one your web application previously used


raineking
PROOP

a year ago

got it!


raineking
PROOP

a year ago

and just to make sure when you say "add a domain to your Nginx service" are you talking about adding it to the nginx-proxy-manager container within railway or the nginx dashboard where i add the actual proxy host


a year ago

add it within Railway


a year ago

actually you'll need to add on both


raineking
PROOP

a year ago

okay great i'll try that


raineking
PROOP

a year ago

thanks!


Status changed to Solved chandrika about 1 year ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...