Solve the problem of port 80 being occupied (close the occupied port, general purpose)

Table of contents

1. Win+R enter cmd to run the command prompt as an administrator

2. Enter: netstat -ano to view all process information, and find the PID corresponding to port 80 (corresponding to the local address, for example: 0.0.0.0:80)

3. Open the task manager and find the application process corresponding to the PID (the Tomcat server is enabled at this time)

4. System process occupation


1. Win+R enter cmd to run the command prompt as an administrator

figure 1

2. Enter: netstat -ano to view all process information, and find the PID corresponding to port 80 (corresponding to the local address, for example: 0.0.0.0:80)

figure 2

3. Open the task manager and find the application process corresponding to the PID (the Tomcat server is enabled at this time)

image 3

4. System process occupation

If the system process occupies port 80, we can’t close it directly, then enter netsh http show servicestate in the command prompt

Figure 4

Then enter the tskill PID (for example: tskill 15320 to close the process

Note: The complete command is: taskkill /pid 15320 /f)
or go to the task management, as shown in Figure 3, close it, and release port 80.

Guess you like

Origin blog.csdn.net/m0_56942812/article/details/125990728