Nginx reverse proxy Node js ssl code example
Example 1: ngingx proxy express get real ip
1) app.set('trust proxy', true) in your Express app.
2) Add proxy_set_header X-Forwarded-For $remote_addr in
the Nginx configuration for your server block.
// sudo nano /etc/nginx/sites-available/default
Example 2: nginx local setup https
$ openssl req -x509 -sha256 -nodes -newkey rsa:2048 -days 365 -keyout localhost.key -out localhost.crt