Nginx报An attempt was made to access a socket in a way forbidden by its access permissions

错误

An attempt was made to access a socket in a way forbidden by its access permissions

原因:Nginx启动需要占用80端口,但是此时你的Windows系统里面的80端口被占用,所以Nginx启动失败!

首先查看80端口被谁占用:

netstat -aon|findstr "80"

展示命令窗口,最右侧是 进程号

已知进程号,将其杀死:

taskkill /F /pid 上面的进程号

你可能感兴趣的:(服务器,nginx)