nginx 安装服务后,启动报:An attempt was made to access a socket in a way forbidden by its access permission解决

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修改为其它的端口即可。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值