centos7下部署node应用程序

一、安装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

猜你喜欢

转载自www.cnblogs.com/minrh/p/9772857.html