We searched the forum here and found several examples of how to run a node app on the server. But we were not successful.
We added context at the end of the vhost
Could someone tell us where we could be wrong in our setup?
docRoot $VH_ROOT/public_html
vhDomain $VH_NAME
vhAliases www.$VH_NAME
adminEmails marcelo@dominio.com.br
enableGzip 1
enableIpGeo 1index {
useServer 0
indexFiles index.php, index.html
}errorlog $VH_ROOT/logs/$VH_NAME.error_log {
useServer 0
logLevel WARN
rollingSize 10M
}accesslog $VH_ROOT/logs/$VH_NAME.access_log {
useServer 0
logFormat “%h %l %u %t “%r” %>s %b “%{Referer}i” “%{User-Agent}i””
logHeaders 5
rollingSize 10M
keepDays 10
compressArchive 1
}scripthandler {
add lsapi:dominio1210 php
}extprocessor dominio1210 {
type lsapi
address UDS://tmp/lshttpd/dominio1210.sock
maxConns 10
env LSAPI_CHILDREN=10
initTimeout 600
retryTimeout 0
persistConn 1
pcKeepAliveTimeout 1
respBuffer 0
autoStart 1
path /usr/local/lsws/lsphp80/bin/lsphp
extUser compr1210
extGroup compr1210
memSoftLimit 2047M
memHardLimit 2047M
procSoftLimit 400
procHardLimit 500
}phpIniOverride {
}
module cache {
storagePath /usr/local/lsws/cachedata/$VH_NAME
}rewrite {
enable 1
autoLoadHtaccess 1
}context /.well-known/acme-challenge {
location /usr/local/lsws/Example/html/.well-known/acme-challenge
allowBrowse 1rewrite {
}
addDefaultCharset offphpIniOverride {
}
}vhssl {
keyFile /etc/letsencrypt/live/dominio.pro/privkey.pem
certFile /etc/letsencrypt/live/dominio.pro/fullchain.pem
certChain 1
sslProtocol 24
enableECDHE 1
renegProtection 1
sslSessionCache 1
enableSpdy 15
enableStapling 1
ocspRespMaxAge 86400
}context / {
type appserver
startupFile server.js
location /home/dominio.pro/public_html
binPath /root/.asdf/installs/nodejs/16.19.1/bin/node
appType node
maxConns 100rewrite {
}
addDefaultCharset off
}