1. 程式人生 > >centos7下部署node應用程序

centos7下部署node應用程序

http nbsp load ali 需要 執行 error etc www

一、安裝node

二、安裝nginx

三、使用express寫一個簡單的demo,並且使用pm2部署

四、錯誤

invalid PID number "" in "/run/nginx.pid"

五、解決辦法

在重啟雲主機(系統)之後,執行 nginx -t 是OK的,然而在執行 nginx -s reload 的時候報錯

nginx: [error] invalid PID number “” in “/run/nginx.pid”

經過查找,找到http://www.cnblogs.com/yuqianwen/p/4285686.html

需要先執行

nginx -c /etc/nginx/nginx.conf

nginx.conf文件的路徑可以從nginx -t的返回中找到。

nginx -s reload

centos7下部署node應用程序