使用 pm2
pm2 start bin/www
[PM2] Starting /home/mars/nginx/sticky-note/bin/www in fork_mode (1 instance)
[PM2] Done.
┌──────────┬────┬──────┬───────┬────────┬─────────┬────────┬─────┬───────────┬──────┬──────────┐
│ App name │ id │ mode │ pid │ status │ restart │ uptime │ cpu │ mem │ user │ watching │
├──────────┼────┼──────┼───────┼────────┼─────────┼────────┼─────┼───────────┼──────┼──────────┤
│ www │ 0 │ fork │ 26484 │ online │ 0 │ 0s │ 0% │ 12.1 MB │ mars │ disabled │
└──────────┴────┴──────┴───────┴────────┴─────────┴────────┴─────┴───────────┴──────┴──────────┘
Use `pm2 show <id|name>` to get more details about an app
使用端口访问没有问题
配置 nginx.conf
server{
listen 80;
root /home/mars/nginx/demo;
location /note{
proxy_pass http://127.0.0.1:3000;
}
}
访问为 404
有兄弟知道如何解决这个问题么 我希望通过配置 nginx 能通过 zhaoyang.space/note 访问到 zhaoyang.space:3000 感觉是代码路径的问题,但是不懂