一、解決Nginx make: *** No rule to make target `build', needed by `default'. Stop.
(1)先將之前的make clean
(2)安裝下面配置
yum -y install make zlib-devel gcc-c++ libtool openssl openssl-devel
(3) 重新configure
./configure
(4) 編譯
make && make install
二、HTTP Error 404.The requested resource is not found.

原因是因為埠被占用,
(1)打開conf檔案夾(G:\software\nginx-1.12.2\conf)

(2)打開nginx.conf
(3)修改埠

(4)用命令關閉并重新啟動
(5)在瀏覽器輸入地址即可
http://localhost:10001/
三、An error occurred.
問題:
2020/10/07 21:26:49 [crit] 8964#22844: *2 GetFileAttributesEx() "G:\software
ginx-1.12.2\static" failed (123: The filename, directory name, or volume label syntax is incorrect), client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", host: "localhost:10001"

原因:windows和linux不一樣,windows中默認是反斜杠\\\,而linux確實斜杠// ,結果路徑中的
G:\software ginx-1.12.2\static \n就會被當做換行,被轉移處理
解決方案:配置資源目錄的時候, root G:\software\\nginx-1.12.2\static; 雙反斜杠表示不轉義,如果是linux就不會存在這個問題,

四、403 Forbidden
directory index of “xxx“ is forbidden
原因:直接使用IP地址和埠號訪問時,需要指定index,如果未指定,出現該報錯,
添加上autoindex on就可以了

轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/164355.html
標籤:其他
上一篇:鎖相環APLL仿真介紹
下一篇:滴滴后端,一二三面。
