How do I free my port 80 on localhost Windows?

2019-01-07 02:23发布

问题:

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!

回答1:

That agony has been solved for me. I found out that what was taking over port 80 is http api service. I wrote in cmd:

net stop http

Asked me "The following services will be stopped, do you want to continue?" Pressed y

It stopped a number of services actually.

Then wrote localhost and wallah, Apache is up and running on port 80.
Hope this helps

Important: Skype uses port 80 by default, you can change this in skype options > advanced > connection - and uncheck "use port 80"



回答2:

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.



回答3:

netstat -a -b

Should tell you what program is bound to port 80



回答4:

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!!!



回答5:

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.



回答6:

Use TcpView to find the process that listens to the port and close the process.



回答7:

Other option to try is to stop SQL Server Reporting Services.



回答8:

Try

netstat -anb -p tcp

that show ports and processes



回答9:

This is just a guess, but since port 80 is the conventional port for HTTP, you may have a webserver running on your system. Is IIS active?

If you are running IIS you may have the web farm service running. That was what was killing my xampp.



回答10:

You can use net stop http it will display which process is using. Moslty world wide web services are using



回答11:

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:

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

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



回答12:

I also had the same problem. net stop http didn't help and World wide web services option under IIS in Windows Control Panel was unchecked. So in XAMPP control panel I just checked the Svc checkbox near Apache start button (Install Apache as service) and rebooted Windows. And now each time Windows starts Apache is started automatically and occupies port 80 before any other service does. Worked for me!



回答13:

Skype likes to use port 80 and blocks IIS. That was my prob.



回答14:

Known Windows Services That Listen on Port 80

From Services Manager (run: services.msc), stop and disable these Windows Services which are known to bind to port 80.

Double click Service, and change ‘Startup Type’ to ‘Disabled’…

  1. SQL Server Reporting Services (ReportServer)
  2. Web Deployment Agent Service (MsDepSvc)
  3. BranchCache (PeerDistSvc)
  4. Sync Share Service (SyncShareSvc)
  5. World Wide Web Publishing Service (W3SVC)
  6. Internet Information Server (WAS, IISADMIN)

skype also using port 80 as default setting and you can uncheck it.

You might, or might not, have some of these Services installed and running.

In my case "SQL Server Reporting Services" was opening port 80.



回答15:

For me, this problem began when I hosted a VPN-connection on my Windows 8 computer.

Simply deleting the connection from "Control Panel\Network and Internet\Network Connections" solved the problem.



回答16:

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

 net stop msdepsvc