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

Post Reply
User avatar
isscbta
Posts: 34
Joined: Mon Jul 19, 2021 1:41 am

Let's suppose that you have nodejs-nginx-template with port 3040 and you want to extend this to port 3041

In your SSH, as root, run:

Code: Select all

FROM='3040'
TO='3041'
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

Tags:
Post Reply