概述
一、解决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:softwarenginx-1.12.2conf)
(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.2static" 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.2static n就会被当做换行,被转移处理
解决方案:配置资源目录的时候, root G:software\nginx-1.12.2static; 双反斜杠表示不转义,如果是linux就不会存在这个问题。
四、403 Forbidden
directory index of “xxx“ is forbidden
原因:直接使用IP地址和端口号访问时,需要指定index,如果未指定,出现该报错。
添加上autoindex on就可以了
最后
以上就是火星上酒窝为你收集整理的Nginx问题总结(1)一、解决Nginx make: *** No rule to make target `build', needed by `default'. Stop.二、HTTP Error 404.The requested resource is not found.三、An error occurred.四、403 Forbiddendirectory index of “xxx“ is forbidden的全部内容,希望文章能够帮你解决Nginx问题总结(1)一、解决Nginx make: *** No rule to make target `build', needed by `default'. Stop.二、HTTP Error 404.The requested resource is not found.三、An error occurred.四、403 Forbiddendirectory index of “xxx“ is forbidden所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复