Some time ago, Apache was stopped. As a result, it was found that it could not be opened and port 80 was occupied, so win + r ran cmd
Enter netstat-ano
You can see that port 80 is occupied by PID4, so open the Task Manager-process-view, select the column, select the PID
We can see that pid 4 is occupied by NT kernel & System.
Find a solution on the Internet for a long time
Http://www.cameroncooke.com/2009/01/25/windows-7-uses-port-80-and-makes-it-impossible-to-install-apache-solution/comment-page-1/#comments
Original article:
Translation:
This process is Http. sys. It is the driving component of http API and the Http stack server. If the port is occupied by Http. sys, some applications that are using http. sys are running. This is why Apache is blocked because Http. sys occupies port 80. We provide an application mechanism to help control port sharing, but I need to investigate what special applications cause this difficulty. If you can provide the output result of the "netsh http show servicestate" command, I can find out which application is using Http. sys. Before you disable Http. sys, follow these steps to run the command:
1. SC config http stat = demand
2. reboot
3. run the command (netsh http show servicestat) as administrator
Before using this command, you can disable http. sys as follows:
1. net stop http
2. SC config http start = disabled
So run net stop http
Confirm by y
Run SC config http start = disabled
Now, start Apache and you can start it.
Check out netstat-ano.
It is found that pid 4 occupies port 445