Win7下nginx默认80端口被System占用,造成nginx启动报错的解决方案 在win7 32位旗舰版下,启动1.0.8版本nginx,显示如下错误: [plain] 2012/04/02 13:55:59 [emerg] 7864#2376: 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)
今天启动window上的nginx总是报错 错误信息是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 listen的80后端口被占用 于是百度了下查看端口的命令 运行–cmd C:\>netstat -aon|findstr "80" TCP 127.0.0.1
Nginx安装 进入存放源码包的目录: cd /usr/local/src 下载源码包: wget http://nginx.org/download/nginx-1.12.1.tar.gz 解压: tar zxf nginx-1.12.1.tar.gz 安装Nginx: ./configure --prefix=/usr/local/nginx 编译安装: make && make install 编辑Nginx启动脚本: vim /etc/init.d/nginx . 复制如下内容 #