升級到win10,安裝visualstudio ,80端口被系統服務佔用的解決

  1. 問題: html

nginx 開不了…… 發現80端口被佔用。nginx



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

  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       4數據庫


  1. 解決辦法:windows

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相關的,尤爲是ide

World Wide Web Publishing Service

 一看,果真是自動啓動的,關掉,並設置爲手動。日誌

 再執行 code

>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端口占用解除!orm



  •   參考: 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

相關文章
相關標籤/搜索