How to make a copy of nodejs-nginx-template with another port
Posted: Mon Aug 29, 2022 10:35 am
Let's suppose that you have nodejs-nginx-template with port 3000 and you want to extend this to port 3001
In your SSH, as root, run:
After that, run:
In your SSH, as root, run:
Code: Select all
FROM='3000'
TO='3001'
Code: Select all
cp /usr/local/vesta/data/templates/web/nginx/node-app-$FROM-pass-to-https.stpl /usr/local/vesta/data/templates/web/nginx/node-app-$TO-pass-to-https.stpl
cp /usr/local/vesta/data/templates/web/nginx/node-app-$FROM-pass-to-https.tpl /usr/local/vesta/data/templates/web/nginx/node-app-$TO-pass-to-https.tpl
sed -i "s|$FROM|$TO|g" /usr/local/vesta/data/templates/web/nginx/node-app-$TO-pass-to-https.stpl
sed -i "s|$FROM|$TO|g" /usr/local/vesta/data/templates/web/nginx/node-app-$TO-pass-to-https.tpl