Categories
Nginx

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:://app.arjunphp.com and http://app.arjunphp/v1

By Arjun

I am Arjun from Hyderabad (India). I have been working as a software engineer from the last 7+ years, and it is my passion to learn new things and implement them as a practice. Aside from work, I like gardening and spending time with pets.

Leave a Reply

Your email address will not be published. Required fields are marked *