На vps создал пользователя, и поддомен strapi.burdujasergiu.com
По этому адресу сайт открывается, только там пусто.
Установил на сервере git, и сделал git pull.
В .env прописал ключи, как прописанно в
документации
В общем, все сделал по инструкции.
Установил pm2, создал server.js, и запустил
NODE_ENV=production pm2 start server.js --name api
Сайт вроде работает.
Только по адресу strapi.burdujasergiu.com:1337 ничего не открывается, только долго грузится.
Логи pm2
burduja@my:~/web/strapi.burdujasergiu.com/public_html$ pm2 log
[TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option)
/home/burduja/.pm2/pm2.log last 15 lines:
PM2 | 2022-10-21T17:15:57: PM2 log: App [api:0] online
PM2 | 2022-10-21T17:15:57: PM2 log: App [api:0] exited with code [1] via signal [SIGINT]
PM2 | 2022-10-21T17:15:57: PM2 log: Script /home/burduja/web/strapi.burdujasergiu.com/public_html/server.js had too many unstable restarts (16). Stopped. "errored"
PM2 | 2022-10-21T17:17:44: PM2 log: App [api:0] starting in -fork mode-
PM2 | 2022-10-21T17:17:44: PM2 log: App [api:0] online
PM2 | 2022-10-21T17:21:30: PM2 log: Stopping app:api id:0
PM2 | 2022-10-21T17:21:30: PM2 log: App [api:0] exited with code [0] via signal [SIGINT]
PM2 | 2022-10-21T17:21:30: PM2 log: pid=85111 msg=process killed
PM2 | 2022-10-21T17:21:30: PM2 log: App [api:0] starting in -fork mode-
PM2 | 2022-10-21T17:21:30: PM2 log: App [api:0] online
PM2 | 2022-10-21T17:25:11: PM2 log: Stopping app:api id:0
PM2 | 2022-10-21T17:25:11: PM2 log: App [api:0] exited with code [0] via signal [SIGINT]
PM2 | 2022-10-21T17:25:11: PM2 log: pid=86166 msg=process killed
PM2 | 2022-10-21T17:25:20: PM2 log: App [api:0] starting in -fork mode-
PM2 | 2022-10-21T17:25:20: PM2 log: App [api:0] online
/home/burduja/.pm2/logs/api-error.log last 15 lines:
0|api | at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15)
0|api | at Module.Hook._require.Module.require (/home/burduja/.nvm/versions/node/v16.18.0/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:81:25)
0|api | at require (node:internal/modules/cjs/helpers:103:18)
0|api | at Object.<anonymous> (/home/burduja/web/strapi.burdujasergiu.com/public_html/server.js:1:16)
0|api | at Module._compile (node:internal/modules/cjs/loader:1155:14)
0|api | at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
0|api | at Module.load (node:internal/modules/cjs/loader:1033:32)
0|api | at Function.Module._load (node:internal/modules/cjs/loader:868:12)
0|api | at Object.<anonymous> (/home/burduja/.nvm/versions/node/v16.18.0/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
0|api | at Module._compile (node:internal/modules/cjs/loader:1155:14) {
0|api | code: 'MODULE_NOT_FOUND',
0|api | requireStack: [
0|api | '/home/burduja/web/strapi.burdujasergiu.com/public_html/server.js'
0|api | ]
0|api | }
/home/burduja/.pm2/logs/api-out.log last 15 lines:
0|api | │ Environment │ production │
0|api | │ Process PID │ 86166 │
0|api | │ Version │ 4.1.7 (node v16.18.0) │
0|api | │ Edition │ Community │
0|api | └────────────────────┴──────────────────────────────────────────────────┘
0|api |
0|api | Actions available
0|api |
0|api | Welcome back!
0|api | To manage your project , go to the administration panel at:
0|api | http://0.0.0.0:1337/admin
0|api |
0|api | To access the server ⚡️, go to:
0|api | http://0.0.0.0:1337
0|api |
Этот адрес не работает 404
https://strapi.burdujasergiu.com:1337/
В какую сторону копать?