天天看點

nginx錯誤集錦

1.[error] OpenEvent(“Global\ngx_stop_1492”) failed (2: The system cannot find the file specified)

這個一般出現在執行nginx關閉指令時:nginx -s stop / nginx -s quit

錯誤原因是nginx伺服器未啟動.

2.[emerg] “upstream” directive is not allowed here in E:\nginx-1.16.1/conf/nginx.conf:18

錯誤原因:upstream放錯了位置。應該将它放在http裡面,并且要在server外面。

nginx錯誤集錦

3.[emerg] CreateFile<> “C:\Users\Administrator/conf/nginx.conf” failed ❤️: The system cannot find the path specified>

錯誤原因:目前操作目錄不是nginx安裝根目錄,應當cd (nginx根目錄)

4.java.lang.IllegalArgumentException: The character [_] is never valid in a domain name.

在配置完nginx之後,進行通路總報400,然後發現tomcat報了這個錯

nginx錯誤集錦

錯誤原因:upstream配置時用了下劃線,把下劃線删掉改為server1b就好了。

nginx錯誤集錦

繼續閱讀