How do I free my port 80 on localhost Windows?

前端 未结 18 1767
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-28 00:59

I installed XAMPP 1.6.8 and for some reason it didn\'t work. Later realized port 80 is not free or not listening. How can I release it or make it free?

Thanks a lot!

相关标签:
18条回答
  • 2020-11-28 01:45

    I had this problem previously,

    if you see the Task manager(after enabling the view for PID), you will find PID=4 is "port 80 in use by NT Kernel & System; "

    Just go to

    1. Control Panel
    2. Programs
    3. Turn Windows features on/off
    4. check if the World wide web services under IIS is checked

    If so, Uncheck and netstat(or TCPVIEW) again to see if 80 is free.

    0 讨论(0)
  • 2020-11-28 01:47

    I was trying to install nginx from here - http://nginx.org/en/docs/windows.html

    Going to http://localhost/ will show something, at least a proper "not found" message
    This is because 80 is the default port, and it was taken by other processes.

    Now run below command:

    net stop http
    
        // Above command stopped below services  
        // - SSDP Discovery  
        // - Print Spooler  
        // - BranchCache  
        // - Function Discovery Resource Publication  
        // - Function Discovery Provider Host  
    

    Now, going to http://localhost/ will fail with a broken link page message.

    Main process was BranchCache
    This process, after stopped, will restart in a few seconds.
    So we need to run other commands we need soon, an example below:

    // this will stop
    net stop http
    
    // immeidately run other command you want to
    start nginx
    

    Now, going to http://localhost/ gave me:

    Welcome to nginx!
    

    Hope that helps.

    0 讨论(0)
  • 2020-11-28 01:48

    use netstat -bano in an elevated command prompt to see what apps are listening on which ports.

    But Usually following applications uses port 80 in windows.

    1. IIS
    2. World Wide Web Publishing service
    3. IIS Admin Service
    4. SQL Server Reporting services
    5. Web Deployment Agent Service

    Stop above applications if running and check!!!

    0 讨论(0)
  • 2020-11-28 01:48

    Type in "netstat -ano" into your command line. I saw that it was showing something for Local Address port 0.0.0.0:80.

    My issue was because I had SQL Server Reporting Services on Port 80. So I followed these instructions and changed the port # from 80 to 81:

    http://seankilleen.com/2012/11/how-to-stop-sql-server-reporting-services-from-using-port-80-on-your-server-field-notes/

    Here is a picture of my command line AFTER I changed the port number for SQL Server Reporting Services:

    enter image description here

    If you are still having the same issue, read this forum:

    http://forum.wampserver.com/read.php?2,66196,66233#REPLY

    0 讨论(0)
  • 2020-11-28 01:52

    in my case,window iis to stop Web Deployment Agent Service.Type in cmd

     net stop msdepsvc 
    
    0 讨论(0)
  • 2020-11-28 01:54

    netstat -ano

    That will show you the PID of the process that is listening on port 80. After that, open the Task Manager -> Processes tab. From the View -> Select Columns menu, enable the PID column, and you will see the name of the process listening on port 80.

    0 讨论(0)
提交回复
热议问题