NGINX Open Source is an open source web server and reverse proxy that has grown in popularity in recent years because of its scalability, outstanding performance, and small footprint. NGINX Open Source was first created to solve the C10K problem (serving 10,000 simultaneous connections on a single web server). NGINX Open Source’s features and performance have made it a staple of high‑performance sites – it’s the #1 web server at the 100,000 busiest websites in the world Consider the following node js application http = ( ); hostname = ; port = ; server = http.createServer( { res.statusCode = ; res.setHeader( , ); res.end( ); }); server.listen(port, hostname, () => { .log( ); }); const require 'http' const 'localhost' const 5000 const ( ) => req, res 200 'Content-Type' 'text/plain' 'Sysmon App is Up and Running!\n' console `Server running at http:// : /` ${hostname} ${port} Now Install Nginx Reverse Proxy in Linux Create a file called and add the following lines to it. /etc/apt/sources.list.d/nginx.list deb / bionic nginx deb-src / bionic nginx http: /nginx.org/packages /ubuntu/ http: /nginx.org/packages /ubuntu/ Next, add the repository signing key, update your system package index and install the nginx package as follows. $ wget --quiet http://nginx.org/keys/nginx_signing. ; ; sudo apt- nginx_signing. $ sudo apt $ sudo apt install nginx key &amp &amp key add key update Next, add the repository signing key and install the nginx package as shown. # wget --quiet http://nginx.org/keys/nginx_signing. ; ; rpm --import nginx_signing. # yum install nginx key &amp &amp key After successfully installing , start it, enable it to auto-start at system boot and check if it is up and running. Nginx <strong>---------- On Debian/Ubuntu ----------</strong> $ sudo systemctl status nginx $ sudo systemctl nginx enable $ sudo systemctl status nginx If you are running a system firewall, you need to open port , and , which the web server listens on for client connection requests. 80 (HTTP) 443 (HTTPS) 5000 (Node app) <strong>---------- On Debian/Ubuntu ----------</strong> $ sudo ufw allow 80/tcp $ sudo ufw allow 443/tcp $ sudo ufw allow 5000/tcp $ sudo ufw reload Configure Nginx as Reverse Proxy For Nodejs Application Now create a server block configuration file for your Node app under as shown. /etc/nginx/conf.d/ $ sudo /etc/nginx/ .d/sysmon. vim conf conf Copy and paste the following configuration (change with your server IP and yourdomainname with your domain name). localhost server { listen ; server_name sysmon.yourdomainname; location / { proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header Host $http_host; proxy_pass http: } } } 80 //localhost:5000; Save the changes and exit the file. Finally, restart the Nginx service to effect the recent changes. OR $ sudo systemctl restart nginx # systemctl restart nginx Access Nodejs Application via Web Browser Now you should be able to access your Node app without providing the port it is listening on, in the URL: this is a much convenient way for users to access it. http: //sysmon.yourdomainname For your test domain name to work, you need to setup local DNS using the file, open it and add the line below in it (remember to change localhost with your server IP and yourdomainname with your domain name as before). /etc/hosts localhost sysmon.yourdomainname ! You had successfully configured Nginx as a reverse proxy for your Nodejs application. Congratulations