This packet only contains the configuration file for Nginx reverse proxy. This is the simplest way for using Nginx as the reverse proxy.
This is a packet with a single Nginx config file. In this file, there are only a few lines of simple code.
This packet aims to let users understand how Nginx reverse proxy work. The purpose is to avoid newbies to learn how reverse proxy works without discussing any other things that may look complicated to new learners.
Just look at the packet config and try to understand.
In this config file, we are actually letting the client access the port listening to 3000 via the reverse proxy. When a user accesses the domain site1.example.com, the user will actually access the site running on port 3000. Of course, the domain should point to the server IP.
I suggest implementing this configuration on your own server. You can run a Node.JS server built using
http module or with
Express.js framework whatever you like on port 3000 and then configure the Nginx server for it.
Submitted by Faruque Ahamed Mollick (frkmollick)
Download packets of source code on Coders Packet