[apache] Apache won't run in xampp

I have just installed XAMPP and everything works fine except that I can't get apache to run. It seems that port 80 is the problem, I have disabled Skype to use port 80 but it doesn't seem to fix it. I read somewhere that the SSL port can be the problem and should be changed. But I cant figure out were the port is or how to change it.

"Check the "/xampp/apache/logs/error.log" file"

I have tried to check this file but inside "logs" there isn't anything. From apache I can go to error but there is not any recently changed documents.

The error:

20:34:24  [Apache]  Problem detected!
20:34:24  [Apache]  Port 80 in use by "system"!
20:34:24  [Apache]  Apache WILL NOT start without the configured ports free!
20:34:24  [Apache]  You need to uninstall/disable/reconfigure the blocking application
20:34:24  [Apache]  or reconfigure Apache to listen on a different port

20:40:50  [Apache]  Attempting to start Apache app...
20:40:50  [Apache]  Status change detected: running
20:40:51  [Apache]  Status change detected: stopped
20:40:51  [Apache]  Error: Apache shutdown unexpectedly.
20:40:51  [Apache]  This may be due to a blocked port, missing dependencies, 
20:40:51  [Apache]  improper privileges, a crash, or a shutdown by another method.
20:40:51  [Apache]  Check the "/xampp/apache/logs/error.log" file
20:40:51  [Apache]  and the Windows Event Viewer for more clues

How to I fix these errors?

This question is related to apache xampp port

The answer is


In my case, it was something else. One day earlier I tried to install Magento using bitnami of xampp. And I deleted That Module

I opened the httpd.conf and found this line:

Include "C:/xampp/apps/magento/conf/httpd-prefix.conf"

I just commented it with #,

Now it's running fine. :)


just disable "world wide web publishing service" , it solve my problem.


In my case, it was something else. One day earlier I tried to install wordpress using bitnam of xampp, but I was not successfull. When I saw the error log, there was an error :

httpd.exe: Syntax error on line 560 of C:/xampp/apache/conf/httpd.conf: Could not open configuration file C:/xampp/apps/wordpress/conf/httpd-prefix.conf: The system cannot find the path specified.

I opened the httpd.conf and found this line:

Include "C:/xampp/apps/wordpress/conf/httpd-prefix.conf"

I just commented it with #,

Now it's running fine. :)


Note that this problem usually occure for two reasons:

1-Port 80 is busy.

2-Port 443 is busy.

For number one as the others said, you can kill Skype and SQL Serever Reporter from

Windows Task Manager>"Services" Tab>"Services..." Button.

But if it dosen't worked, it's probably because of port 443, so try this one:

If you use VMware, go to

Windows Task Manager>"Services" Tab>"Services..." Button, and find "VMware Workstation Server" service, double click on it and press "Stop" button.

There is no need to stop other VMware's services.

Then again try to run Apache


There are 2 ways to solving this problem.

  1. If you want to run Apache in another port then:Replace in xampp/apache/conf/httpd.conf "ServerName localhost:80" by "ServerName localhost:81" At line 184. After that even it may not work.Then replace
#Listen 0.0.0.0:80
#Listen [::]:80
Listen 80 

by

#Listen 0.0.0.0:81
#Listen [::]:81
Listen 81

at line 45

  1. If you want to use port 80. Then follow this. In Windows 8 “World Wide Publishing Service is using this port and stopping this service will free the port 80 and you can connect Apache using this port. To stop the service go to the “Task manager –> Services tab”, right click the “World Wide Publishing Service” and stop. If you don't find there then Then go to "Run > services.msc" and again find there and right click the “World Wide Publishing Service” and stop.

If you didn't find “World Wide Publishing Service” there then go to "Run>>resmon.exe>> Network Tab>>Listening Ports" and see which process is using port 80

enter image description here

And from "Overview>>CPU" just Right click on that process and click "End Process Tree". If that process is system that might be a critical issue.


Try stopping Apache and MySql and starting them again in the following order.

  1. Apache
  2. MySql
  3. Etc...

Wait for both services to stop properly before restarting. Turning them on and off too quickly gives the same problem.

Inspired by lansharks answer.


logout your account in skype.. then in xampp control panel click start from the line of Apache..


None of the above worked for me. This is what finally worked for me:

1) Start Services (Type services in your start > search)
2) Look for Apache services.It was disabled in my case. Enabling it worked for me.

Some people have also reported duplicate listing of Apache services which has prevented it from starting. If that is the case, delete/disable one of the Apache services which corresponds to the wrong path.

A restart of XAMPP might be required.


Do you have Bitnami installed? If so it is most likely one of those installations check by opening command prompt as admin or terminal in linux, enter this...

netstat -b

This will give an application name to those processes and ports in use. Look for :80 or :443


Skype, try closing it and then running xampp, if it works then change the skype port to stop using port 80


Like Ianshark points out, a common reason for this error in Windows 7 is the Web Deployment Agent service.

The Web Deploy Tool enables administrators to use IIS Manager to deploy ASP.NET and PHP applications to an IIS server.

You can disable it from XAMPP Control Panel by clicking the "Services" button. If you have changed the port in the Apache config file, change it back to 80. Then uninstall Microsoft Web Deploy, if you prefer a more permanent solution.


Take a look at this site:

http://www.lukebrowning.com/blog/nt-kernel-system-using-port-80/

In my case, it was the SQL Server Reporting Service, but others have seen IIS or the Web Deployment Agent Service.

Open a cmd window and run services.msc, find the service, and stop it. Then try to start Apache. If it works, disable the other service.


If you just want to make Apache run an don't mind which port it is running on, do the following:

In the XAMPP Control Panel, click on the Apache - 'Config' button which is located next to the 'Logs' button.

Select 'Apache (httpd.conf)' from the drop down. (notepad should open)

Do Ctrl + F to find '80'. Click 'find next' three times and change line Listen 80 to Listen 8080

Click 'find next' again a couple times until you see line ServerName localhost:80 change this to ServerName localhost:8080

Do Ctrl + S to save and then exit notepad.

Start up Apache again in the XAMPP Control Panel, Apache should successfully run.

Use http://localhost:8080/ in your browser address bar to check everything is working.

EDIT

Also you may have problems running XAMPP while running IIS. If you are running IIS it might be worth stopping the service then starting XAMPP.


In my case I simply had to run the control panel as administrator


I had the same kind of problems. I finally made it to work.

I successfully changed the apache ports to listen to ports not used by other programs Port 443 is used by SSL and Skype

I believe that the XAMPP Control Panel has a bug and I have screen shots in my posts to. I do not have enough credibility on this web site to upload pictures.

I have the whole thing written down with screen shots in the following blog posts:

http://hodentek.blogspot.com/2014/02/one-way-to-handle-port-80-in-use-by.html http://hodentekhelp.blogspot.com/2014/02/on-installing-apache-on-windows-7-64bit.html http://hodentekhelp.blogspot.com/2014/02/do-you-want-to-change-ports-that-skype.html


In my case the problem was that the logs folder did not exist resp. the error.log file in this folder.


Examples related to apache

Enable PHP Apache2 Switch php versions on commandline ubuntu 16.04 Laravel: PDOException: could not find driver How to deploy a React App on Apache web server Apache POI error loading XSSFWorkbook class How to enable directory listing in apache web server Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details How to enable php7 module in apache? java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.metadata.SessionHiveMetaStoreClient The program can't start because api-ms-win-crt-runtime-l1-1-0.dll is missing while starting Apache server on my computer

Examples related to xampp

Xampp localhost/dashboard phpMyAdmin ERROR: mysqli_real_connect(): (HY000/1045): Access denied for user 'pma'@'localhost' (using password: NO) Is there way to use two PHP versions in XAMPP? Where to find htdocs in XAMPP Mac phpMyAdmin access denied for user 'root'@'localhost' (using password: NO) How to downgrade php from 7.1.1 to 5.6 in xampp 7.1.1? How to turn on/off MySQL strict mode in localhost (xampp)? mysqli_connect(): (HY000/2002): No connection could be made because the target machine actively refused it How to install mcrypt extension in xampp Fatal error: Uncaught Error: Call to undefined function mysql_connect()

Examples related to port

Docker - Bind for 0.0.0.0:4000 failed: port is already allocated How do I kill the process currently using a port on localhost in Windows? Node.js Port 3000 already in use but it actually isn't? Can't connect to Postgresql on port 5432 Spring Boot - How to get the running port Make docker use IPv4 for port binding How to change the default port of mysql from 3306 to 3360 Open firewall port on CentOS 7 Unable to launch the IIS Express Web server, Failed to register URL, Access is denied XAMPP Port 80 in use by "Unable to open process" with PID 4