Open derekantrican opened 3 years ago
Normally in production / deployed environments a reverse proxy server sits in front of your application, but behind the server's firewall, forwarding requests to the appropriate backend application that will ultimately service the network request. It provides things like caching, load balancing, and security. In your case it would allow multiple applications to run on the same server (localhost) because the reverse proxy would forward some requests to one application and some to the other.
Reverse proxy servers in deployed environments are not intended to be bundled with your server code like you are suggesting. Reverse proxy servers can be configured and run on a server separate from the backend server applications. I've had a lot of success deploying .NET servers (ASP.NET and console apps like NetCoreServer) using NGINX
Pardon terminology and whatnot - I'm very new to all the network admin stuff of ports, proxies, etc
I have NetCoreServer set up on my home network handling public internet requests to port 8080 (which are forwarded to the localhost:8080 port). I have other applications running on my local network only (not exposed via port forwarding) - eg ports 1234 & 5678. I'd like to utilize NetCoreServer to handle some specific requests (eg PUBLIC_IP:8080/myapp) and display the content at localhost:1234. According to https://superuser.com/questions/1547937/having-multiple-web-services-run-at-home-on-the-same-ports-80-and-443, it seems like I need a "reverse proxy" (which I am entirely unfamiliar with). Is this something NetCoreServer can do already? If not, could this be added?
If this isn't already a part of NetCoreServer, this seems like a decent place to start: https://auth0.com/blog/building-a-reverse-proxy-in-dot-net-core/