You are on page 1of 4

1.

Open a CMD prompt and type in command: net stop was /y

2.

Run Dialog Box (press keys Win+R) .. then type: services.msc

I then scrolled down to: World Wide Web Publishing Service Double clicked on it and clicked STOP
(if this service status is Started)
3.Start Apache again with XAMPP :)

How to Solve Port 80


Problems When
Running Apache on
Windows
This article was written in 2011 and remains one of our most popular posts.
If youre keen to learn more about using Apache, you may find this recent
article on launching a VM with Apache CloudStackof great interest.
If only clients realized the hassles developers encounter with their OS.
Clients will call you the second their email fails (they forgot to switch on their
router) or their website breaks (theyre using IE5.0). Who can you call when
Apache wont start because port 80 is blocked?
Apologies for not writing a typical web development post but this is exactly
the problem I encountered and it seems many others have too. I run Apache
and IIS on Windows and prefer a server switching method so only one
application listens on port 80 at any time. It works well and Ive run similar
set-ups on Windows 7, Vista, XP, and NT for many years.
Today, however, Apache wouldnt start. The following error appeared in the
Application Event Viewer (Administrative Tools):

The Apache service named

reported the following error:

>>> (OS 10013) An attempt was made to access a socket in a way


forbidden by its access permissions.
:make_sock: could not bind to address 0.0.0.0:80.

Another application was hogging port 80.

The Obvious Candidates


There are a number of well-known Windows programs which use port 80:
IIS
The most likely culprit is Microsoft Internet Information Server. You can stop
the service from the command line on Windows 7/Vista:

net stop was /y

or XP:

net stop iisadmin /y

SQL Server Reporting Services


SSRS can remain active even if you uninstall SQL Server. To stop the service:
1.
Open SQL Server Configuration Manager.
2.
Select SQL Server Services in the left-hand pane.
3.
Double-click SQL Server Reporting Services.
4.
Hit Stop.
5.
Switch to the Service tab and set the Start Mode to Manual.
Skype
Irritatingly, Skype can switch to port 80. To disable it, select Tools > Options

> Advanced > Connection then uncheck Use port 80 and 443 as
alternatives for incoming connections.

Whats Using Port 80?


Further detective work is necessary if IIS, SSRS and Skype are not to blame.
Enter the following on the command line:

netstat -ao

The active TCP addresses and ports will be listed locate the line with local
address 0.0.0.0:80 and note the PID value.
Now right-click the task bar and select Start Task Manager. Navigate to the
Processes tab and, if necessary, click View > Select Columns to ensure
PID (Process Identifier) is checked. You can now locate the PID you noted
above. The description and properties should help you determine which
application is using the port.
The Task Manager allows you to kill the process, but be a little wary about
doing that especially if its NT Kernel & System.

Microsoft-HTTPAPI/2.0
NT Kernel & System is an essential service. Stopping it will probably stop
Windows in a blue-screeny-like way. Therefore, enter the following at the
command line:

telnet 127.0.0.1 80

If youre faced with a blank screen, type GET and hit return. The chances
are, youll see a line stating that Microsoft-HTTPAPI/2.0 is listening on port 80.
If thats the case, open Services from Administrative Tools and locate Web
Deployment Agent Service. Stop the service and set its startup type to
Manual.

The Web Deployment Agent Service is deployed with WebMatrix and was the
cause of my woes. It may also be distributed with other applications installed
using Microsofts Web Platform Installer.
That caused me a few frustrating hours so I hope it solves your Apache or
WAMP start-up problems.
If you enjoyed reading this post, youll love Learnable; the place to learn
fresh skills and techniques from the masters. Members get instant access to
all of SitePoints ebooks and interactive online courses, like PHP & MySQL
Web Development for Beginners.

You might also like