在 debian 10 中 , 安装源默认的 nginx 1.14.2 出现错误 : Failed to parse PID from file /run/nginx.pid: Invalid argument .
在 launchpad.net 找到解决方案 (ubuntu 16.04 使用此方法已修复 ,debian 10 也修复可以正常使用 )
# Fix for Nginx PID problem in Ubuntu 16.04 in an EC2 instance
sudo systemctl stop nginx
sudo mkdir /etc/systemd/system/nginx.service.d
# build the file in root where no sudo is needed
printf "[Service]\nExecStartPost=/bin/sleep 0.1\n" > override.conf
sudo cp override.conf /etc/systemd/system/nginx.service.d/override.conf
sudo systemctl daemon-reload
sudo systemctl start nginx
修复后 systemctl status nginx 查看状态
推荐使用 lnmp.org 或者 oneinstack 一键包进行安装建站环境 .
Post:20191109
评论区