请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

Windows启动nginx错误

https://img1.sycdn.imooc.com//szimg/5e5e6d9a09a2650602580023.jpg

https://img1.sycdn.imooc.com//szimg/5e5e6da60951fc5205360028.jpg

这两个是nginx.conf下改动的地方

https://img1.sycdn.imooc.com/szimg/5e5e6dcf0943941f05280238.jpg

这是在upload.conf下新增的内容

https://img1.sycdn.imooc.com//szimg/5e5e6e1a097e24a407150275.jpg

这是nginx.conf的路径

https://img1.sycdn.imooc.com/szimg/5e5e6e460967f85208020123.jpg

这是upload.conf的路径

https://img1.sycdn.imooc.com/szimg/5e5e6e870929063603560158.jpg

这是使用cmd启动nginx,没有任何提示,访问8089端口没有反应,下面是访问8089端口的截图

https://img1.sycdn.imooc.com//szimg/5e5e6f7d09e4b42118850815.jpg

没有设置代理

https://img1.sycdn.imooc.com//szimg/5e5e6f7009625ddd05110093.jpg

访问80端口截图

https://img1.sycdn.imooc.com/szimg/5e5e6f9b0984ca2c18810330.jpg


最后,寻求好心人帮忙解答,我真的不知道哪个地方写错了

正在回答

插入代码

1回答

可能是配置文件路径找不到吧,试试nginx -t有没有报错,如果报错了就把配置文件路径写全了

0 回复 有任何疑惑可以回复我~
  • 提问者 幽辰 #1
    nginx: the configuration file E:\nginx-1.17.8/conf/nginx.conf syntax is ok
    nginx: [emerg] bind() to 0.0.0.0:80 failed (10013: An attempt was made to access a socket in a way forbidden by its access permissions)
    nginx: configuration file E:\nginx-1.17.8/conf/nginx.conf test failed
    显示的这个,然后我查了一下,是80端口被占用,pid值为4
    TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       4
    我查找4这个端口对应的服务名称
    System                           4 Services                   0     10,760 K
    结果查到是System这个服务名称,我上网查了下这个服务不能停止啊
    回复 有任何疑惑可以回复我~ 2020-03-04 12:07:02
  • 提问者 幽辰 #2
    嗷,解决了,原来是SQL的日志占用了端口。
    回复 有任何疑惑可以回复我~ 2020-03-04 12:22:54
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信