Web Design
Mobile Internet
Brand Design
Innovative
News
Encyclopedias

Check which software is occupying the Apache and IIS80 ports on the website

Date:2017-01-12 Source: Shangpin China Type: website encyclopedia
Word Size: small   medium   big

We are Website construction When starting the Apache server after completion, we often find that the port 80 we need to use is occupied by other programs, but we don't know who is occupying it. At this time, we need to find out the "real culprit". How do we do it?

View the port occupation on the Mac system:

1. Open the terminal input in the utility:

sudo lsof -i:3307

It is seen that port 3307 is occupied by MySQL, and the pid is 95.

2. Kill process according to PID

sudo kill -9 95

Windows View Port Occupancy:

1. Start -->Run -->cmd, or press window+R to call up the command window

 cmd

2. Enter the command netstat - ano to list all ports. In the list, we can observe the occupied port, such as 49157, and find it first.

 Enter the command: netstat - ano

3. View the PID corresponding to the occupied port, enter the command: netstat - aan | findstr "49157", enter, and record the last digit, that is, PID. Here is 2720

 View the PID corresponding to the occupied port


4. Continue to enter tasklist | findstr "2720" and press Enter to check which process or program occupies port 2720. The result is: svchost.exe

 Port 2720 occupied

5. Or we can open the task manager, switch to the process tab, and view the process corresponding to the 2720 in the PID column. If the PID column is not visible, see the following figure:

 Open Task Manager

6. Then we click View -->Select Column, tick the PID (Process Identifier), and click OK.

 Tick in front of PID (Process Identifier)

7. In this way, we can see the ID column of PID, and see who the process corresponding to 2720 is. If not, we can check the following process that shows all users. The image name is svchost.exe, and the description is that the main process of Windows is exactly the same as the above command.

 Main process of Windows


8. To end the process: select the process in the task manager and click the "End Process" button, or enter: taskkill/f/t/im Tenantdl.exe in the command window of cmd.

 End Process


Please contact our consultant

+86 10-60259772

Please provide your contact number. The project manager of shangpin China will contact you as soon as possible.