System Information
- Strapi Version: 4.17
- Operating System: ubuntu 20.4
- Database: mysql
- Node Version: 16.18.0
- NPM Version: 8.19.2
- Yarn Version: don’t use
My subdomain is strapi.burdujasergiu.com
And it works.
On the server made git pull and made this steps like in docs How to Deploy Strapi to Your Own VPS
Install pm2, create server.js and start strapi with
NODE_ENV=production pm2 start server.js --name api
config/servers.js
module.exports = ({ env }) => ({
host: env('HOST', '0.0.0.0'),
port: env.int('PORT', 1337),
app: {
keys: env.array('APP_KEYS'),
},
url: env('PUBLIC_URL', 'https://strapi.burdujasergiu.com'),
});
And seems that site is working
pm2 logs
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-21T19:16:08: PM2 log: App [api:0] starting in -fork mode-
PM2 | 2022-10-21T19:16:08: PM2 log: App [api:0] online
PM2 | 2022-10-21T19:16:12: PM2 log: App [api:0] exited with code [1] via signal [SIGINT]
PM2 | 2022-10-21T19:16:12: PM2 log: App [api:0] starting in -fork mode-
PM2 | 2022-10-21T19:16:12: PM2 log: App [api:0] online
PM2 | 2022-10-21T19:18:05: PM2 log: Stopping app:api id:0
PM2 | 2022-10-21T19:18:06: PM2 log: App [api:0] exited with code [0] via signal [SIGINT]
PM2 | 2022-10-21T19:18:06: PM2 log: pid=105736 msg=process killed
PM2 | 2022-10-21T19:18:06: PM2 log: App [api:0] starting in -fork mode-
PM2 | 2022-10-21T19:18:06: PM2 log: App [api:0] online
PM2 | 2022-10-21T19:21:03: PM2 log: Stopping app:api id:0
PM2 | 2022-10-21T19:21:03: PM2 log: App [api:0] exited with code [0] via signal [SIGINT]
PM2 | 2022-10-21T19:21:03: PM2 log: pid=105845 msg=process killed
PM2 | 2022-10-21T19:21:03: PM2 log: App [api:0] starting in -fork mode-
PM2 | 2022-10-21T19:21:03: PM2 log: App [api:0] online
/home/burduja/.pm2/logs/api-error.log last 15 lines:
0|api | at loadFile (/home/burduja/web/strapi.burdujasergiu.com/public_html/node_modules/@strapi/strapi/lib/core/app-configuration/load-config-file.js:35:14)
0|api | at /home/burduja/web/strapi.burdujasergiu.com/public_html/node_modules/@strapi/strapi/lib/core/app-configuration/config-loader.js:16:18
0|api | at Array.reduce (<anonymous>)
0|api | at module.exports (/home/burduja/web/strapi.burdujasergiu.com/public_html/node_modules/@strapi/strapi/lib/core/app-configuration/config-loader.js:13:6)
0|api | at module.exports (/home/burduja/web/strapi.burdujasergiu.com/public_html/node_modules/@strapi/strapi/lib/core/app-configuration/index.js:54:38)
0|api | at new Strapi (/home/burduja/web/strapi.burdujasergiu.com/public_html/node_modules/@strapi/strapi/lib/Strapi.js:54:23)
0|api | at module.exports (/home/burduja/web/strapi.burdujasergiu.com/public_html/node_modules/@strapi/strapi/lib/Strapi.js:497:18)
0|api | at Object.<anonymous> (/home/burduja/web/strapi.burdujasergiu.com/public_html/server.js:2:1)
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 | at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
/home/burduja/.pm2/logs/api-out.log last 15 lines:
0|api | │ Environment │ production │
0|api | │ Process PID │ 105845 │
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 | https://strapi.burdujasergiu.com/admin
0|api |
0|api | To access the server ⚡️, go to:
0|api | https://strapi.burdujasergiu.com
0|api |
0|api | Project information
0|api | ┌────────────────────┬──────────────────────────────────────────────────┐
0|api | │ Time │ Fri Oct 21 2022 19:21:16 GMT+0000 (Coordinated … │
0|api | │ Launched in │ 10184 ms │
0|api | │ Environment │ production │
0|api | │ Process PID │ 106162 │
0|api | │ Version │ 4.1.7 (node v16.18.0) │
0|api | │ Edition │ Community │
0|api | └────────────────────┴──────────────────────────────────────────────────┘
0|api | Actions available
0|api | Welcome back!
0|api | To manage your project 🚀, go to the administration panel at:
0|api | https://strapi.burdujasergiu.com/admin
0|api | To access the server ⚡️, go to:
0|api | https://strapi.burdujasergiu.com```
This url don't work.
https://strapi.burdujasergiu.com:1337/
Site just a long time is refreshing.
Thanks in advance.
Is my first deploy strapi to server.
And thanks for strapi.