Create a website with a Reverse Proxy configuration in Nginx
sudo site example.com -proxy=[localhost:3001]
Go to the path /etc/nginx/sites-available/and edit the file example.com. Find and comment on the line includeas below
# WebinolyCustom
# include apps.d/example.com-proxy.conf;
# WebinolyCustomEnd
Restart nginx
nginx -t && nginx -s reload
Create a directory for ssl authentication , which can be deleted after the ssl has been created
mkdir /var/www/example.com/htdocs
Create SSL
sudo site example.com -ssl=on
Now go to the path again /etc/nginx/sites-available/and edit the file example.com. Currently this file has the ssl configuration added. Now we change the line includeback to the original:
# WebinolyCustom
include apps.d/example.com-proxy.conf;
# WebinolyCustomEnd
Restart nginx
nginx -t && nginx -s reload