1、nginx1.18.0安装服务成功后,启动服务的时候,一闪直接报错:
2、查看Nginx的日志error.log发现启动一次报一条错,并且都是一样的:
2024/09/14 14:42:18 [emerg] 6852#6280: 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)
2024/09/14 14:42:25 [emerg] 5516#5228: 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)
2024/09/14 14:46:47 [emerg] 7108#4964: 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)
80端口被占用了,因为服务器安装了IIS,然后占用了80端口,所以启动的时候报错了。
3、解决:修改IIS端口或者将IIS端口给停了,这样再次启动就会成功:
因为暂时没有用到,所以就停了。
停了IIS以后,找到网站中的默认网站(Default Web Site),然后右侧【绑定】,将80修改为其它的端口即可。
标签:made,socket,0.0,forbidden,端口,access,80,14 From: https://blog.csdn.net/jwbabc/article/details/142258543