Nginx Reverse Proxy with Private Networking
Anonymous
TRIALOP

3 years ago

I am trying to setup an nginx server to reverse proxy two other services backend & frontend, and expose it publicly via this nginx. I set port of both backend & frontend at 80, and both are not public, but I want to merge them such that / serves the frontend service and /api/ serves the backend service. But when I setup the nginx conf so and used the private networking address, it crashes and doesnt work. Please help

54 Replies

Anonymous
TRIALOP

3 years ago

let me get you the command that runs it, a sec


Anonymous
TRIALOP

3 years ago


Anonymous
TRIALOP

3 years ago


Anonymous
TRIALOP

3 years ago

do we need that [::] ipv6 thing?


Anonymous
TRIALOP

3 years ago

something like this?


brody
EMPLOYEE

3 years ago

next start -H :: -p $PORT


Anonymous
TRIALOP

3 years ago

awesome, let me try that now


brody
EMPLOYEE

3 years ago

make sure you have a service variable PORT = 3000


Anonymous
TRIALOP

3 years ago

byw, this should be fine right? (like if I want to give a default)


brody
EMPLOYEE

3 years ago

nope


brody
EMPLOYEE

3 years ago

delete line 33, 34


Anonymous
TRIALOP

3 years ago

how do I set a default?


brody
EMPLOYEE

3 years ago

^


Anonymous
TRIALOP

3 years ago

yes I have 🫡 , but it wil take a while to get build with this new package.json


brody
EMPLOYEE

3 years ago

and what's your new start command


Anonymous
TRIALOP

3 years ago

this,


Anonymous
TRIALOP

3 years ago

being deployed


brody
EMPLOYEE

3 years ago

okay just checking, since you like to change things from what I say


Anonymous
TRIALOP

3 years ago

service port is already set since a while


Anonymous
TRIALOP

3 years ago

Works perfectly now!!!



Anonymous
TRIALOP

3 years ago

❤️


brody
EMPLOYEE

3 years ago

I'm happy I could help


Anonymous
TRIALOP

3 years ago

You did an amazing job at helping me


brody
EMPLOYEE

3 years ago

thank you


Anonymous
TRIALOP

3 years ago

railways team themselves didnt bother much


Anonymous
TRIALOP

3 years ago

Now, I can start migrating several of our core services into railway,


brody
EMPLOYEE

3 years ago

I mean they're right, it is better suited for discord


brody
EMPLOYEE

3 years ago

that's your aws costs?


Anonymous
TRIALOP

3 years ago

Railway should probably get you something


brody
EMPLOYEE

3 years ago

bro they won't even give me a sticker


brody
EMPLOYEE

3 years ago

I've been asking for stickers for so long


Anonymous
TRIALOP

3 years ago

ahhh!!! I thought initially you were from their support


brody
EMPLOYEE

3 years ago

I'm just a community member


Anonymous
TRIALOP

3 years ago

I will mail them, as reply that you helped a lot. And once we hit some bills they probably should value it, (I subsricbed to pro, just to see if they will support)


Anonymous
TRIALOP

3 years ago

they should recruit you as support


brody
EMPLOYEE

3 years ago

I'm too silly for them


Anonymous
TRIALOP

3 years ago

ahh, dont tell so. Where are you from byw? what do you do for a living?


brody
EMPLOYEE

3 years ago

maple syrup land, and I help people in the railway server for a living


Anonymous
TRIALOP

3 years ago

silly me had to google one that up!!! ❤️


Anonymous
TRIALOP

3 years ago

I suggest you make a few templates and contribute them to railway, like the nginx and caddy ones


brody
EMPLOYEE

3 years ago

haha made you google


brody
EMPLOYEE

3 years ago

I have made a few templates, and I'll be adding the caddy template in the future


Anonymous
TRIALOP

3 years ago


brody
EMPLOYEE

3 years ago

I currently have 2$


Anonymous
TRIALOP

3 years ago

hmm…


brody
EMPLOYEE

3 years ago

I don't know how it works, but oh well


brody
EMPLOYEE

3 years ago

pretty damn clean with caddy

{
    admin off
    persist_config off
    auto_https off
    log { format console }
}

:{$PORT} {
    reverse_proxy frontend.railway.internal:3000

    handle_path /api/* {
        reverse_proxy backend.railway.internal:3000
    }
}

brody
EMPLOYEE

3 years ago


etrippler
PRO

2 years ago

Is this still true? There is no way to pull a private image?


brody
EMPLOYEE

2 years ago

it's true for hobby and pro users


etrippler
PRO

2 years ago

😦 Is there explicit support for it at the enterprise level or is it something you'd have to work with them on?


etrippler
PRO

2 years ago

Sorry to necro this old thread btw


All good- we might have something for you, can you raise a direct support thread? (You should be able to open one)


Loading...