[windows] Windows could not start the Apache2 on Local Computer - problem

During the installation of Apache2 I got the following message into cmd window:

Installing the Apache2.2 service The Apache2.2 service is successfully installed. Testing httpd.conf....

Errors reported here must be corrected before the service can be started. httpd.exe: Could not reliably determine the server's fully qualified domain name , using 192.168.1.3 for ServerName (OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs Note the errors or messages above, and press the key to exit. 24...

and after installing everything look fine, but it isn't. If I try to start service I got the following message:

Windows could not start the Apache2 on Local Computer. For more information, review the System Event Log. If this is a non-Micorsoft service, contact the service vendor, and refer to service-specific error code 1.

Apach2 version is 2.2.9

Does anyone have the same problem, or could help me.

This question is related to windows windows-xp apache2

The answer is


There is some other program listening on port 80, usual suspects are

  1. Skype (Listens on port 80)
  2. NOD32 (Add Apache to the IMON exceptions' list for it to allow apache to bind)
  3. Some other antivirus (Same as above)

Way to correct it is either shutting down the program that's using the port 80 or configure it to use a different port or configure Apache to listen on a different port with the Listen directive in httpd.conf. In the case of antivirus configure the antivirus to allow Apache to bind on the port you have chosen.

Way to diagnose which app, if any, has bound to port 80 is run the netstat with those options, look for :80 next to the local IP address (second column) and find the PID (last column). Then, on the task manager you can find which process has the PID you got in the previous step. (You might need to add the PID column on the task manager)

C:\Users\vinko>netstat -ao -p tcp

Conexiones activas

  Proto  Dirección local          Dirección remota        Estado           PID
  TCP    127.0.0.1:1110         127.0.0.1:51373        TIME_WAIT       0
  TCP    127.0.0.1:1110         127.0.0.1:51379        TIME_WAIT       0
  TCP    127.0.0.1:1110         127.0.0.1:51381        ESTABLISHED     388
  TCP    127.0.0.1:1110         127.0.0.1:51382        TIME_WAIT       0
  TCP    127.0.0.1:1110         127.0.0.1:51479        TIME_WAIT       0
  TCP    127.0.0.1:1110         127.0.0.1:51481        TIME_WAIT       0
  TCP    127.0.0.1:1110         127.0.0.1:51483        TIME_WAIT       0
  TCP    127.0.0.1:1110         127.0.0.1:51485        ESTABLISHED     388
  TCP    127.0.0.1:1110         127.0.0.1:51487        TIME_WAIT       0
  TCP    127.0.0.1:1110         127.0.0.1:51489        ESTABLISHED     388
  TCP    127.0.0.1:51381        127.0.0.1:1110         ESTABLISHED     5168
  TCP    127.0.0.1:51485        127.0.0.1:1110         ESTABLISHED     5168
  TCP    127.0.0.1:51489        127.0.0.1:1110         ESTABLISHED     5168
  TCP    127.0.0.1:59264        127.0.0.1:59265        ESTABLISHED     5168
  TCP    127.0.0.1:59265        127.0.0.1:59264        ESTABLISHED     5168
  TCP    127.0.0.1:59268        127.0.0.1:59269        ESTABLISHED     5168
  TCP    127.0.0.1:59269        127.0.0.1:59268        ESTABLISHED     5168
  TCP    192.168.1.34:51278     192.168.1.33:445       ESTABLISHED     4
  TCP    192.168.1.34:51383     67.199.15.132:80       ESTABLISHED     388
  TCP    192.168.1.34:51486     66.102.9.18:80         ESTABLISHED     388
  TCP    192.168.1.34:51490     74.125.4.20:80         ESTABLISHED     388

If you want to Disable Skype from listening on port 80 and 443, you can follow the link http://www.mydigitallife.info/disable-skype-from-using-opening-and-listening-on-port-80-and-443-on-local-computer/


I had the same problem. I checked netstat, other processes running, firewall and changed httpd.conf, stopped antivirus, But all my efforts were in vain. :(

So finally the solution was to stop the IIS. And it worked :)

I guess IIS and apache cant work together. If anybody know any work around let us know.


Windows 10 - administrator account

I needed to switch the account to an admin type account, in windows services

httpd.exe -k install

fails to add setup with enough user rights.


I had the same issue. when i restarted my wamp it turns to Yellow color icon but not green. In services i stop all sql server services. after that it works for me..

  • Two thinks that should must be take care. 1 ) port should be different 2 ) stop those services which can be on port 80

I had the same problem. I checked netstat, other processes running, firewall and changed httpd.conf, stopped antivirus, But all my efforts were in vain. :(

So finally the solution was to stop the IIS. And it worked :)

I guess IIS and apache cant work together. If anybody know any work around let us know.


Always double check httpd.conf to see if document root is correctly pointing to an existing folder

#if you have c:\your-main-folder\www\
DocumentRoot "c:/your-main-folder/www/" 

#if you have c:\your-main-folder\www\sub-folder\
DocumentRoot "c:/your-main-folder/www/sub-folder/" 

DocumentRoot points to a folder that must exist in your drive.


if appache and IIS both are running at a time then there is a posibility to hang the apache service,,,,

when i stopped all IIS websites once and then restarted apache service and it works for me....Jai...


Yes , i had to change the port :80 to :90 as port :80 was busy by some other system resource.

You can see the logs in the folder of Apache2.2\logs

Thanks,


Hi i also meet this problem today. And the log error in the Event viewer is as following The Apache service named reported the following error:

1.Wrapper php-cgi.exe cannot be accessed: (720005)Access is denied.

2.apache service monitor:the requested operation has failed

It is actual the access problem.So the solution as flowing is help me change the php-cgi.exe security properties

  • not inheit from parent the permission...

  • please add the everyone user


Me also coming the same problem. The solution is goto add or remove programes then click the turn windows features on or off. Turn off the IIS. That is turn off the 'Internet information services' and 'Internet information service removable web core'. I chosed the remaining features are on. Computer will ask to restart the system. Restart ur computer and then install the apache http server. I got it. Server succesfully working...


I had the same problem. I checked netstat, other processes running, firewall and changed httpd.conf, stopped antivirus, But all my efforts were in vain. :(

So finally the solution was to stop the IIS. And it worked :)

I guess IIS and apache cant work together. If anybody know any work around let us know.


Windows 10 - administrator account

I needed to switch the account to an admin type account, in windows services

httpd.exe -k install

fails to add setup with enough user rights.


Remove apache from Control Panel and delete the apache folder from Program Files and restart the machine, then install apache again. This will solve the problem; if not do the following: Install IIS if not installed, then start IIS and stop it ... Using services start apache service... enjoy apache.


Always double check httpd.conf to see if document root is correctly pointing to an existing folder

#if you have c:\your-main-folder\www\
DocumentRoot "c:/your-main-folder/www/" 

#if you have c:\your-main-folder\www\sub-folder\
DocumentRoot "c:/your-main-folder/www/sub-folder/" 

DocumentRoot points to a folder that must exist in your drive.


Yes , i had to change the port :80 to :90 as port :80 was busy by some other system resource.

You can see the logs in the folder of Apache2.2\logs

Thanks,


Run the httpd.exe from the command line, as Tim mentioned. The path to PostgreSQL changed, nothing else was running on Port 80 and I didn't see anything in the error.log file.

I clone my boot drive/partition once the base is setup so I don't have to spend three days installing and retweaking everything. Turns I had reinstalled my WAPP stack and used very specific names/versions for PostgreSQL. Windows will not return a specific error message unless you run the command from the command line.


if you are using windows os and believe that skype is not the suspect, then you might want to check the task manager and check the "Show processes from all users" and make sure that there is NO entry for httpd.exe. Otherwise, end its process. That solves my problem.


if appache and IIS both are running at a time then there is a posibility to hang the apache service,,,,

when i stopped all IIS websites once and then restarted apache service and it works for me....Jai...


For me, this was the result of having set the document root (in httpd.conf) to a directory that did not exist (I had just emptied htdocs of a previous project).


I've had this problem twice. The first problem was fixed using the marked answer on this page (thank you for that). However, the second time proved a bit more difficult.

I found that in my httpd-vhosts.conf file that I made a mistake when assigning the document root to a domain name. Fixing this solved my problem. It is well worth checking (or even reverting to a blank copy) your httpd-vhosts.conf file for any errors and typo's.


Windows Vista Home Premium operating system issue: The easiest way to resolve the issue is to change the port number in Apache2\conf\httpd.conf.

Change the port number at the following lines. 'Listen' from 80 to 8888 and 'ServerName' machinename (ex:localhost) from 80 to 8888. Save then close. Open up Apache Service Monitor and restart service or go to Computer Management > Services and locate Apache 2.2 and start or restart.


I had the same issue. when i restarted my wamp it turns to Yellow color icon but not green. In services i stop all sql server services. after that it works for me..

  • Two thinks that should must be take care. 1 ) port should be different 2 ) stop those services which can be on port 80

Follow this step it will works fine. Go to Control panel-->Programs and features-->click Turn Windows features on and off--> see IIS is Checked Or Not If checked please unckeck IIS and restart the computer.After that Open services see Web Deployement Agent Service status if its started please stop.And also see WampAppache and WampSqlID if its not started please start manually. it will works for me.


Remove apache from Control Panel and delete the apache folder from Program Files and restart the machine, then install apache again. This will solve the problem; if not do the following: Install IIS if not installed, then start IIS and stop it ... Using services start apache service... enjoy apache.


Thanks for the help guys. I found another culprit. Recently SimplifyMedia added a photo sharing option. Apparently it too uses port 80 and prevented Apache from starting up. I hope this helps someone out.


I hope this helps others with this error.

Run the httpd.exe from the command line to get an accurate description of the problem.

I had the same error message and it turned out to be a miss configured ServerRoot path. Even after running setup_xampp.bat the httpd.conf had the wrong path.

My error.log was empty and starting the service does not give an informative error message.


Me also coming the same problem. The solution is goto add or remove programes then click the turn windows features on or off. Turn off the IIS. That is turn off the 'Internet information services' and 'Internet information service removable web core'. I chosed the remaining features are on. Computer will ask to restart the system. Restart ur computer and then install the apache http server. I got it. Server succesfully working...


the better way to resolve the issue is change the port number in Apache2\conf\httpd.conf . Change the port number as fallows::: Listen 8888 and ServerName machinename:8888 .Restart the Apache server after changing the port number.


i faced the same issue, in my case i needed to add module in httpd.conf
the file was incomplete with incorrect keywords ( like LoadModule )
go to command line, go to C:\Apache24\bin

C:\Apache24\bin > httpd.exe

the reason for the error can be known from the output of the above command


Windows Vista Home Premium operating system issue: The easiest way to resolve the issue is to change the port number in Apache2\conf\httpd.conf.

Change the port number at the following lines. 'Listen' from 80 to 8888 and 'ServerName' machinename (ex:localhost) from 80 to 8888. Save then close. Open up Apache Service Monitor and restart service or go to Computer Management > Services and locate Apache 2.2 and start or restart.


i faced the same issue, in my case i needed to add module in httpd.conf
the file was incomplete with incorrect keywords ( like LoadModule )
go to command line, go to C:\Apache24\bin

C:\Apache24\bin > httpd.exe

the reason for the error can be known from the output of the above command


For me, this was the result of having set the document root (in httpd.conf) to a directory that did not exist (I had just emptied htdocs of a previous project).


if you are using windows os and believe that skype is not the suspect, then you might want to check the task manager and check the "Show processes from all users" and make sure that there is NO entry for httpd.exe. Otherwise, end its process. That solves my problem.


Run the httpd.exe from the command line, as Tim mentioned. The path to PostgreSQL changed, nothing else was running on Port 80 and I didn't see anything in the error.log file.

I clone my boot drive/partition once the base is setup so I don't have to spend three days installing and retweaking everything. Turns I had reinstalled my WAPP stack and used very specific names/versions for PostgreSQL. Windows will not return a specific error message unless you run the command from the command line.


I hope this helps others with this error.

Run the httpd.exe from the command line to get an accurate description of the problem.

I had the same error message and it turned out to be a miss configured ServerRoot path. Even after running setup_xampp.bat the httpd.conf had the wrong path.

My error.log was empty and starting the service does not give an informative error message.


Follow this step it will works fine. Go to Control panel-->Programs and features-->click Turn Windows features on and off--> see IIS is Checked Or Not If checked please unckeck IIS and restart the computer.After that Open services see Web Deployement Agent Service status if its started please stop.And also see WampAppache and WampSqlID if its not started please start manually. it will works for me.


I've had this problem twice. The first problem was fixed using the marked answer on this page (thank you for that). However, the second time proved a bit more difficult.

I found that in my httpd-vhosts.conf file that I made a mistake when assigning the document root to a domain name. Fixing this solved my problem. It is well worth checking (or even reverting to a blank copy) your httpd-vhosts.conf file for any errors and typo's.


the better way to resolve the issue is change the port number in Apache2\conf\httpd.conf . Change the port number as fallows::: Listen 8888 and ServerName machinename:8888 .Restart the Apache server after changing the port number.


Thanks for the help guys. I found another culprit. Recently SimplifyMedia added a photo sharing option. Apparently it too uses port 80 and prevented Apache from starting up. I hope this helps someone out.


Hi i also meet this problem today. And the log error in the Event viewer is as following The Apache service named reported the following error:

1.Wrapper php-cgi.exe cannot be accessed: (720005)Access is denied.

2.apache service monitor:the requested operation has failed

It is actual the access problem.So the solution as flowing is help me change the php-cgi.exe security properties

  • not inheit from parent the permission...

  • please add the everyone user


Examples related to windows

"Permission Denied" trying to run Python on Windows 10 A fatal error occurred while creating a TLS client credential. The internal error state is 10013 How to install OpenJDK 11 on Windows? I can't install pyaudio on Windows? How to solve "error: Microsoft Visual C++ 14.0 is required."? git clone: Authentication failed for <URL> How to avoid the "Windows Defender SmartScreen prevented an unrecognized app from starting warning" XCOPY: Overwrite all without prompt in BATCH Laravel 5 show ErrorException file_put_contents failed to open stream: No such file or directory how to open Jupyter notebook in chrome on windows Tensorflow import error: No module named 'tensorflow'

Examples related to windows-xp

installing JDK8 on Windows XP - advapi32.dll error How to Create a script via batch file that will uninstall a program if it was installed on windows 7 64-bit or 32-bit How do I find files with a path length greater than 260 characters in Windows? Apache Maven install "'mvn' not recognized as an internal or external command" after setting OS environmental variables? How to access share folder in virtualbox. Host Win7, Guest Fedora 16? How to create ls in windows command prompt? How to fix an UnsatisfiedLinkError (Can't find dependent libraries) in a JNI project How to use random in BATCH script? How to delete or change directory of a cloned git repository on a local computer How do I manually create a file with a . (dot) prefix in Windows? For example, .htaccess

Examples related to apache2

Only variable references should be returned by reference - Codeigniter 413 Request Entity Too Large - File Upload Issue Site does not exist error for a2ensite How to convert .pem into .key? Apache: Restrict access to specific source IP inside virtual host CodeIgniter removing index.php from url Failed Apache2 start, no error log Apache2: 'AH01630: client denied by server configuration' what does it mean "(include_path='.:/usr/share/pear:/usr/share/php')"? How to check is Apache2 is stopped in Ubuntu?