Enter netstat-abn-> c:/port80.txt
Find the program pid that occupies port 80 in the C-drive port80.txt file, and write down the pid. Open the Task Manager and click "View"/select a column.
, Select "PID (process identifier)", click the "process" tab, find the pid corresponding to port 80, and you can see that the program occupies
Changed the port of the program, and then restarted to make the change take effect.
If I find that the system occupies port 80, we can try the following solution:
1. Open the registry: regedit
2. Find HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ services \ HTTP.
3. Select Start on the right and change it to 0.
4. Restart the System. The System process does not occupy port 80.
After the restart, start Apache again.
Supplement:If the above method cannot be solved, I can see a method written by a foreign friend.
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
Apache modifies the listening port as follows:
Open httpd. conf
Modify Listen 80 to Listen 81
Apache can monitor more than one port at a time to implement multiple Http services.
Just add a line like Listen 82.
Do not forget to restart the Apache service to make the configuration take effect.