CyberPanel OpenLiteSpeed:主机节点 JS 网站

问题描述 投票:0回答:2

我购买了自己的 VPS 并安装了 CyberPanel。现在我想托管用 NodeJS (Typescript) 编写的应用程序。

所以我已将我的应用程序上传到

public_html
文件夹中:

应用程序是由这些命令产生的:

"build": "tsc --project ./&&copyFiles www/* build",
"build-deploy": "npm run build && cp package*.json build && cd build && npm install --only=production",

我还使用

build-deploy
npm run 命令来包含
node_modules
文件夹。问题是我的网站无法访问。它给出了超时错误,它继续加载页面,然后出现超时错误。

Request Timeout 该请求处理时间过长,已超时 由服务器输出。如果不应该超时,请联系 该网站的管理员增加“连接超时”。

这是我的

vHost Conf
:

docRoot                   $VH_ROOT/public_html
vhDomain                  $VH_NAME
vhAliases                 www.$VH_NAME
adminEmails               [email protected]
enableGzip                1
enableIpGeo               1

index  {
  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:apidi5248 php
}

extprocessor apidi5248 {
  type                    lsapi
  address                 UDS://tmp/lshttpd/apidi5248.sock
  maxConns                10
  env                     LSAPI_CHILDREN=10
  initTimeout             600
  retryTimeout            0
  persistConn             1
  pcKeepAliveTimeout      1
  respBuffer              0
  autoStart               1
  path                    /usr/local/lsws/lsphp81/bin/lsphp
  extUser                 apidi5248
  extGroup                apidi5248
  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             1

  rewrite  {

  }
  addDefaultCharset       off

  phpIniOverride  {

  }
}


vhssl  {
  keyFile                 /etc/letsencrypt/live/api.digilifesoftware.com/privkey.pem
  certFile                /etc/letsencrypt/live/api.digilifesoftware.com/fullchain.pem
  certChain               1
  sslProtocol             24
  enableECDHE             1
  renegProtection         1
  sslSessionCache         1
  enableSpdy              15
  enableStapling           1
  ocspRespMaxAge           86400
}

context / {
  type                    appserver
  location               $VH_ROOT/public_html
  startupFile             server.js
  binPath                 /usr/bin/node
  appType                 node
  maxConns                100
 
  accessControl  {
    allow                 *
  }

  rewrite  {

  }
  addDefaultCharset       off
}

请帮忙

node.js vps cyber-panel
2个回答
0
投票

检查此文件

/usr/local/lsws/logs/stderr.log
。这是节点错误日志,也许你会发现一些有用的东西)


0
投票

我也有同样的错误(-_-)...

© www.soinside.com 2019 - 2024. All rights reserved.