systemctl start nginx timeout

昨儿个研究docker ,搭建私有仓库。想着用nginx代理一下仓库地址。方式使用80端口,于是愉快的下载,编辑,安装nginx。创建nginx.service作为系统启动服务。

结果......,多折腾了2个小时。。。。因为systemctl start nginx 的时候总是timeout。实际上nginx已经起来了。

顿时一阵baidu,bing,google全上阵,最终发现问题是 nginx.service 中的

PIDFile=/run/nginx.pid

和 nginx.conf中的

pid /run/nginx.pid

2处的文件路径不一致...硬是折磨了我2个小时,哎。。。。。,还是不熟悉。。坑

原文地址:https://www.cnblogs.com/calvinK/p/7070749.html