codehaven - php snippets - coding help
Generic filters
Exact matches only

Port 80 being used, track the program using it

26th June 2013



If you are getting the message “Apache port is being used by other application”, Follow below details for solution.

Open command prompt(start -> run -> cmd) and type the following command : C:> netstat -aon | findstr 0.0:80
Last column of the output is the PID of the application using port 80. Eg. 3420 is the PID of application using port 80.


You can find the application name in Task Manager. Go to Process Tab then in Menu Bar of Task Manager go to View -> Select Column -> Check “PID” and press Ok.
Search for the PID in the process list(Click Below “Show processes from all users” in case if you don’t find the PID), corresponding process is the application which is using port 80

  1. Open CMD, type netstat -ona
  2. Find the program that uses the port 80 on your computer, and write down the Port Identifier, PID.
  3. In most cases it’s PID 4 which is using it. PID 4,
    is usually being used by MYSQL Reporting service or could be a software
    that is operating on http.
  4. Open Task Manager, Go to Proccess Tab, Click View, Add the PID column to the Task Manager. Hit OK
  5. Find the PID 4 user and Kill it.
  6. Change the Listen 81 to 80
  7. Restart Apache

Was this code snippet helpful?