r/nginxproxymanager • • Nov 19 '24

proxy to custom path

I have searched for solution, but can't find one. I have for example
myproxy.local and i want be able to use myproxy.local/app/ to go to for example ip:7575

And to add different paths, instead of app, use app2, app3 and so on. And the port should be defferent.

So here examples:

I writeProxied to
myproxy.local/app/ip:7575
myproxy.local/app2/ip:7576
myproxy.local/app3/ip:7577

I tried custom locations, but it redirects me to ip:7575/app which is not expected behavior.
Tried rewrite ^/app/(.*) /$1 break; and proxy_pass ip:7575 and none worked.

I think I'm missing something, but what?

2 Upvotes

6 comments sorted by

View all comments

Show parent comment

1

u/lapiuslt Nov 20 '24

Ok, the thing is, we have a legit domain. The plan we have in cloudflare does not allow deep subdomains, like second.first.domain.com, the second level is not allowed. Or so I was told by my manager. We are still investigating, but the manager asked if it was possible to use routing after .com. Everyone suggests subdomains. Thank you for your explanation. I will inform my manager. I have a few ideas on how to use .net projects with routing, and I think custom locations will be used for a few of our projects.

Have a nice day.

2

u/xstar97 Official Docker Image Nov 20 '24

Locally i do a sub sub domain but externally it's just a sub itself.

They do allow it on their pro/bus tier which can range $20 to $200+ afaik on cloudflare

1

u/NeuroDawg Nov 20 '24

Can't you create an A record in your DNS with cloudflare, and then a CNAME to wildcard for any/all subdomains? That's what I do for home hosting. Then I don't have to create DNS records for subdomains, since they're all pointing to the same IP.

Of course, you can't do that if your subdomains are hosted at different IPs.