Foreword
I used to use Windows 7
system. I installed Windows 10
some time ago, and I haven’t had time to set up the php environment yet. I tried a lot today, using nginx+php, the port is 80 (iis service has been stopped), nginx just can't start, and nine times out of ten, the port is occupied.
I found
Using the port mapping command netstat -ano
, I found that port 80 is occupied by the System process with pid 4. According to previous experience: one is occupied by IIS
; the other is SQL Server Reporting Services
Reporting service occupied.
Note: If the system is
Windows 7 and below
, there is basically no problem in solving the above two.
Question
Both the two services mentioned above have been stopped. What program is occupying the port?
Method
Use HTTP command netsh http show servicestate
Look in detail, you will find the information about port 80, write down the version.
Then, search down and find the version corresponding to the above
Open Task Manager
, select Details
, find the corresponding process, then right-click Go to Services
After going to the service, right-click to stop the service.
Call it a day
Everything is ready, you can safely code.
The above introduces the solution to the problem that port 80 is occupied by the System process with pid 4 under Windows, including Windows content. I hope it will be helpful to friends who are interested in PHP tutorials.