NGINX reverse Proxy – Serve from different folder

In this post, I will show you how we can configure NGINX to serve applications form the different directories. I have two node application both are running at different ports, 8000 and 8080.
I want to expose those APIs just like they are serving from a single source.

Here is my NGINX config file content, generally it will be available at /etc/nginx/site-available.

If you want to add another application at same host just create a new block. here we have configured NGINX reverse Proxy for two apps using location block, v1 is listening at 8080 and / is listening at 8000.

Now you can access applications at https::// and http://app.arjunphp/v1

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.