9

Apache is currently running. Some solutions offered elsewhere on the Internet suggest typing apache -k install and then retrying apache -k restart. But if I try that, I get another error,

Only one usage of each socket is permitted.

apache -k stop gives the following error (the same as I originally got from apache -k restart),

No installed service named "Apache2"

4 Answers 4

11

There is a small application Apache installs, usually displayed in the system tray from where you can restart Apache.

You can restart a service with many utilities, like sc.exe, but just using the shell, use

net stop Apache2.2-Zend && net start Apache2.2-Zend

In my case, the name of the service is Apache2.2-Zend. You can check the name in services.msc.

1
  • I've using Certbot for automatic renewal, but it never worked. It used "Apache2.4" as default name, but thanks to your hint to check the service name I could fix it!
    – Gnietschow
    Commented Jan 21, 2021 at 9:06
6

First you must bring the command prompt to the bin of Apache folder on your computer, i.e my Apache folder is in directory C:\Apache24\. I used command cd C:\Apache24\bin and then used command httpd -k restart to restart the Apache service.

2

I found another way. Using the Windows GUI, I selected Start->Programs->Administrative Tools->Services. I then searched for Apache in the running services. I did not find it. I found one called sugarApache however. I was able to restart the sugarApache using the 'Services' GUI.

-2

For Windows Server 2008, after an automatically downloaded update and server reset our Apache server stopped. Error logs read as follows:

The Apache service named reported access a socket in a way forbidden by its access permissions. : make_sock: could not bind to address 0.0.0.0:80 Logged 12/10/2016 9:04:13 AM (the time the server downloaded and reset a Windows update)

Also:

The Apache service named reported the following error: no listening sockets available, shutting down. The Apache service named reported the following error: unable to open logs.

The way to fix this (because simple restart doesn't work) is to open a command prompt and type:

iireset/stop

Thereafter restart Apache by running:

services.msc

Pick Apache, and hit start.

Or you can pick any other way you want to restart Apache.

You must log in to answer this question.