logico / vestacp-nodejs

Run automatically Node.JS apps in VestaCP.
114 stars 68 forks source link

Instructions #28

Open rik43 opened 8 months ago

rik43 commented 8 months ago

I'm use myvestacp.

1) Until I added execution rights to the .sh file it didn't work.

2) Also, in nginx logs you can see the warn.

2024/02/21 16:58:37 [warn] 613220#613220: protocol options redefined for 212.22.77.190:443 in /home/admin/conf/web/site.com.nginx.ssl.conf:8
2024/02/21 16:58:37 [warn] 613220#613220: the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /home/admin/conf/web/site.com.nginx.ssl.conf:12

this is not error, but to fix this, change stpl file:

// before
    listen      %ip%:%proxy_ssl_port%;
// after
    listen      %ip%:%proxy_ssl_port% ssl http2;

// then, remove line: 
ssl on;

3) To restart node app without change template to default, run command:

/usr/local/vesta/data/templates/web/nginx/NodeJS.sh admin site.com 1 /home

(change your user name and host) parameters explain

user=$1
domain=$2
ip=$3   # not used
home=$4

you can see application launch logs.

4) nvm is optional. if it not installed - its skipped.