升级到win10,安装visualstudio ,80端口被系统服务占用的解决

  1. 问题: 

nginx 开不了…… 发现80端口被占用。



C:\WINDOWS\system32>netstat -nao|find ":80"

  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       4


  1. 解决办法:

HTTP 服务状态快照(服务器会话视图):
-----------------------------------------------------

服务器会话 ID: FF00000120000001
    版本: 2.0
    状态: Active
    属性:
        最大带宽: 4294967295
        超时:
            实体正文超时(秒): 120
            耗尽实体正文超时(秒): 120
            请求队列超时(秒): 65535
            空闲连接超时(秒): 120
            标头等待超时(秒): 120
            最小发送速率(字节/秒): 240
    URL 组:
    URL 组 ID: FE00000140000001
        状态: Active
        请求队列名称: DefaultAppPool
        属性:
            最大带宽: 已继承
            最大连接: 4294967295
            超时:
                实体正文超时(秒): 120
                耗尽实体正文超时(秒): 120
                请求队列超时(秒): 65535
                空闲连接超时(秒): 120
                标头等待超时(秒): 0
                最小发送速率(字节/秒): 0
            日志记录信息:
                日志目录: C:\inetpub\logs\LogFiles\W3SVC1
                日志格式: 0
            身份验证配置:
                启用的身份验证方案:
            已注册的 URL 数目: 1
            已注册的 URL 数目:
                HTTP://*:80/

请求队列:
    请求队列名称: DefaultAppPool
        版本: 2.0
        状态: Active
        请求队列 503 详细级别: 受限的
        最大请求数目: 1000
        附加活动进程数目: 0
        控制器进程 ID: 3112
        进程 ID:



C:\WINDOWS\system32>sc config http stat
描述:
        在注册表和服务数据库中修改服务项。
用法:
        sc <server> config [service name] <option1> <option2>...

选项:
注意: 选项名称包括等号。
      等号和值之间需要一个空格。
 type= <own|share|interact|kernel|filesys|rec|adapt|userown|usershare>
 start= <boot|system|auto|demand|disabled|delayed-auto>
 error= <normal|severe|critical|ignore>
 binPath= <.exe 文件的 BinaryPathName>
 group= <LoadOrderGroup>
 tag= <yes|no>
 depend= <依存关系(以 / (斜杠)分隔)>
 obj= <AccountName|ObjectName>
 DisplayName= <显示名称>
 password= <密码>

C:\WINDOWS\system32>sc config http stat = demand
描述:
        在注册表和服务数据库中修改服务项。
用法:
        sc <server> config [service name] <option1> <option2>...

选项:
注意: 选项名称包括等号。
      等号和值之间需要一个空格。
 type= <own|share|interact|kernel|filesys|rec|adapt|userown|usershare>
 start= <boot|system|auto|demand|disabled|delayed-auto>
 error= <normal|severe|critical|ignore>
 binPath= <.exe 文件的 BinaryPathName>
 group= <LoadOrderGroup>
 tag= <yes|no>
 depend= <依存关系(以 / (斜杠)分隔)>
 obj= <AccountName|ObjectName>
 DisplayName= <显示名称>
 password= <密码>

C:\WINDOWS\system32>net stop http
下面的服务依赖于 HTTP Service 服务。
停止 HTTP Service 服务也会停止这些服务。

   World Wide Web Publishing Service
   SSDP Discovery
   Print Spooler

你想继续此操作吗? (Y/N) [N]: y
发生系统错误 5。

拒绝访问。

 

 由此看出,可能是http相关服务在捣鬼。

 到 服务 里面查看这几个http相关的,尤其是

World Wide Web Publishing Service

 一看,果然是自动启动的,关掉,并设置为手动。

 再执行 

>netstat -nao |find ":80"
  TCP    0.0.0.0:8000           0.0.0.0:0              LISTENING       2532
  TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING       2532
>nginx.exe -t
nginx: the configuration file D:\GeekSoftware\nginx-1.8.0/conf/nginx.conf syntax is ok
nginx: configuration file D:\GeekSoftware\nginx-1.8.0/conf/nginx.conf test is successful

   OK ,nginx可以正常运行,80端口占用解除!



  •   参考: http://superuser.com/questions/352017/pid4-using-port-80    

  •  其他:

http://stackoverflow.com/questions/788348/how-do-i-free-my-port-80-on-localhost-windows

https://technet.microsoft.com/en-us/library/cc725882(v=ws.10).aspx#BKMK_11

https://technet.microsoft.com/en-us/library/cc736564(v=ws.10).aspx

http://www.tenforums.com/tutorials/4499-services-start-stop-disable-windows-10-a.html



转载于:https://my.oschina.net/lxrm/blog/539434

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值