I installed Apache 2.2.11 on the Windows XP portion of my desktop workstation for development purposes, but I got a lot of ambiguous errors when starting from the Apache Service Monitor or the Windows start menu.
Finally, when I started Apache from the command line I got a more informative error:
(OS 10048) Only one usage of each socket address (protocal/network address/port) is normally permitted. : make_sock: could not bind to address 127.0.0.1:80 no listening sockets available, shutting down
It turns out, I had Skype running, which by default binds to ports 5520, 80, and 443. There are several solutions:
- Quit Skype and don’t run Skype and Apache at the same time. Not ideal, but it works.
- Change which port Apache uses. In your Apache2/conf/httpd file, change the line “Listen 80” to something like “Listen 8888”. Apache should start, but you’ll need to access it via http://localhost:8888 instead of merely http://localhost
- Change which ports Skype uses for incoming connections. Go to Tools–Options–Advanced–Connection and un-check the box next to “Use port 80 and 443 as alternatives for incoming connections.”
As far as I can tell, the last option has no ill-effect on Skype, although it might if your firewall or router is blocking port 5520.
I ended up installing Apache 2.0 in addition to Apache 2.2, as I was having trouble with mod_perl with the latter. I ran into the same issue there as well, and once I quit Skype I was able to start Apache.
Strangely enough, I now seem to have both Skype and Apache running and both listening on port 80, so perhaps I’ve misdiagnosed the problem completely.