How to make a copy of nodejs-nginx-template with another port

Post Reply
User avatar
isscbta
Team Member
Posts: 130
Joined: Mon Jul 19, 2021 1:41 am
Has thanked: 15 times
Been thanked: 3 times

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:

Code: Select all

FROM='3000'
TO='3001'
After that, run:

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

Tags:
Post Reply