解決 Nginx 報錯 invalid PID number "" in "/xxx/xxx/xxx/nginx.pid"

解決 Nginx 報錯 invalid PID number "" in "/xxx/xxx/xxx/nginx.pid"

1. 出現的現象

在 nginx.conf 文件中加上下面的語句出現了報錯

在這裏插入圖片描述

查看 Nginx 日誌: 路徑爲 nginx 安裝路徑下 /logs/error.log 文件中.
2020/03/26 17:17:29 [notice] 23687#0: signal process started
2020/03/26 17:17:29 [error] 23687#0: invalid PID number “” in “/mnt/data/ngnix/ngnix/nginx/nginx.pid”

在這裏插入圖片描述

2. 解決方法

重新加載 nginx.conf 配置文件

# nginx 執行路徑 -c nginx.conf 文件所在路徑
nginx -c nginx.conf

檢驗, 重啓 Nginx

nginx -t
nginx -s reload

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章