Service: Ubuntu 22.04
Node: v18.18.2
NPM: 9.8.1
I would like to re-present the process of commands and operations when installing the Strapi feature on the server
my domain: xxx.com
1/ Install CLI
npm install -g create-strapi-app
I using aapanel for manager website, i create website by add domain xxx.com and folder of website locate at /www/wwwroot/xxx.com
1. In aaPanel, go to the "Web" section and click "Add Site."
2. Fill in the required information:
* **Site Name:** xxx.com
* **Domain:** xxx.com
* **Root Directory:** /www/wwwroot/xxx.com/
2/ Create a Strapi App:
cd /www/wwwroot/xxx.com
npx create-strapi-app strapi (this name of folder project 'strapi')
3/ Buid
cd /www/wwwroot/xxx.com/strapi
npm run build
4/ Set Up Nginx as a Reverse Proxy: I edit the config file of domain xxx.com
location / {
proxy_pass `http://localhost:1337`;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
at save i restart nginx with run 'systemctl restart nginx'
5/ Start Strapi with PM2
I have installed it pm2 so I run
pm2 start npm --name "strapi" -- start
And when I visit xxx.com
It show page Welcome to your Strapi app
1/ Welcome page not load image it only error 404 not found?
2/ When i click button "Create the first administrator" It navigates to xxx.com/admin and nothing shows up on this page
I'm not sure which step I'm doing wrong, please help me