Apache on Windows not releasing port 80 on service stop, and will not restart
When I try to restart Apache it throws the following error:
============================================
Apache 2 is starting ...
(OS 10048)Normalerweise darf jede Socketadresse (Protokoll, Netzwerkadresse oder Anschluss) nur jeweils einmal verwendet werden.
: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
=============================================
I used netstat, and found that the PID holding port 80 was the same PID that Apache was previously using. This PID does not show up in task manager, and it is not found when taskkill is attempted on it.
It seems that Apache is some开发者_如何学编程how holding onto the port on exit. The only way I can restart the Apache service is by changing the Listen port each time, or by restarting the server itself.
Has anyone come across this before, and if so, is there anything I can do to fix it?
If this is a windows machine then apps like apache usually are lanuched as a service.
You can close it with
CMD+R -> services.msc , search for apache and press stop
or
cmd -> net stop apache
or
cmd -> net stop apache2
精彩评论