Nginx is capable of more than serving web pages. It can load balance, cache and act as a reverse proxy.
We recently had need to access two web services on the same server through a single interface. This is where the reverse proxy came in.
- Service A runs on port 9010
- Service B runs on port 9020
- Access to both services needs to be via a single front end using traditional http over port 80
Not ideal, but it’s not my system design, just a challenge we need to face. The way we tackled it was using an Nginx reverse proxy and split the calls to specific URL paths on each web service to the relevant underlying back end service.