首頁  >  文章  >  運維  >  nginx常見錯誤及解決方法介紹

nginx常見錯誤及解決方法介紹

王林
王林轉載
2020-11-19 14:50:235578瀏覽

nginx常見錯誤及解決方法介紹

nginx中常見的錯誤及解決方法有:

報錯一:

nginx: [error] CreateFile() "C:\mytools\nginx-1.8.1/logs/nginx.pid" failed (2: The system cannot find the file specified)

nginx: [error] Open() "C:\mytools\nginx-1.8.1/logs/nginx.pid" failed

解決方法:

使用指令建立/logs/nginx.pid檔案

nginx -c conf/nginx.conf

錯誤二:

nginx: [alert] could not open error log file: CreateFile() "logs/error.log" failed (3: The system cannot find the path specified)
 [emerg] : invalid number of arguments in "root" directive in C:\mytools\nginx-1.8.1\conf\nginx.conf:45

解決方法:

##設定檔root指定一個目錄的時候最結尾不能是"\"。

相關推薦:

nginx教學

以上是nginx常見錯誤及解決方法介紹的詳細內容。更多資訊請關注PHP中文網其他相關文章!

陳述:
本文轉載於:cnblogs.com。如有侵權,請聯絡admin@php.cn刪除