Setting up an Nginx Reverse Proxy for Serving Multiple Node.js Apps from Subfolders
If you’re running multiple Node.js scripts under the same domain on a VPS like DigitalOcean, you’ll need to use a reverse proxy since two Node.js apps can’t listen on the same port. Nginx is a popular choice for setting up a reverse proxy. To begin, you’ll need to edit the Nginx configuration file: sudo nano /etc/nginx/sites-available/default The default configuration file looks like this: server { listen 80 default_server; listen [::]:80 default_server; root /var/www/html; index index....