windows10 - Windows 10 安装 nginx 出错
问题描述
logs 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)



这里发现是因为 system占用80端口、system为系统进程,又不能关闭,怎样才能解决呢?我测试了一下 win7是好的。大家平常是怎样解决的呢?
接上面,配置出现问题,test.conf copy 一份 nginx.conf,配置如下, 为什么请求 www.hht.com(这里我在host里配置过了),为什么还是 80端口,配置里面的端口是32000,
这又是什么原因呢?
test.conf
#user nobody;worker_processes 1;error_log logs/error.log;#error_log logs/error.log notice;#error_log logs/error.log info;pidlogs/nginx.pid;events { worker_connections 1024;}http { include mime.types; default_type application/octet-stream; #log_format main ’$remote_addr - $remote_user [$time_local] '$request' ’ # ’$status $body_bytes_sent '$http_referer' ’ # ’'$http_user_agent' '$http_x_forwarded_for'’; #access_log logs/access.log main; sendfileon; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; server {listen 32000;server_name www.hht.com;charset utf-8;location / { root deployed; index index.html index.htm;}error_page 404 /404.html;# redirect server error pages to the static page /50x.html#error_page 500 502 503 504 /50x.html;location = /50x.html { root html;} } server {listen 192.168.0.102:33000;server_name www.hhh.com;charset utf-8;access_log logs/host.access.log main;location / { root html; index index.html index.htm;}#error_page 404 /404.html;# redirect server error pages to the static page /50x.html#error_page 500 502 503 504 /50x.html;location = /50x.html { root html;} }}



问题解答
回答1:1.system那个占用80端口的应用或许可以使用net stop servicename关闭2.给nginx使用另外一个端口先跑起来再来其他方面的问题(抓住重点)
回答2:Check IIS or IIS Express.
回答3:一楼已经说的很清楚了,不过强烈建议在linux上面玩,别问我怎么知道的,都是走过的坑啊。。。
回答4:绑在其他端口
排查端口占用
使用Docker :)
相关文章:
1. 在windows下安装docker Toolbox 启动Docker Quickstart Terminal 失败!2. debian - docker依赖的aufs-tools源码哪里可以找到啊?3. javascript - 请问为什么这个补零函数为什么要放window.onload外面?4. javascript - vue-cli与后端框架集成config/index.js配置问题5. css - .clearfix:after中为什么设置display: table6. 初学 node.js,读取本地html文件报错7. 想写一个python分析统计apache 日志文件的脚本8. 浅谈Vue static 静态资源路径 和 style问题9. javascript - mock.js可以存储数据吗10. javascript - Userscript 如何阻止内联js中某个函数的执行?

网公网安备