Apache does not start from the XAMPP control panel (error: Apache terminated unexpectedly. This may be due to a blocked port)

I successfully installed XAMPP (xampp-win32-1.8.2-0-VC9-installer.exe) on Windows 7. But, unfortunately, the following error was detected while starting Apache from the XAMPP control panel:

5:38:38 PM [Apache] Error: Apache shutdown unexpectedly. 5:38:38 PM [Apache] This may be due to a blocked port, missing dependencies, 5:38:38 PM [Apache] improper privileges, a crash, or a shutdown by another method. 5:38:38 PM [Apache] Press the Logs button to view error logs and check 5:38:38 PM [Apache] the Windows Event Viewer for more clues 5:38:38 PM [Apache] If you need more help, copy and post this 5:38:38 PM [Apache] entire log window on the forums 

Error on running Apache at XAMPP Controm Panel

+57
php apache port xampp server
Jul 30 '13 at 11:44
source share
20 answers

There are many possible answers to this problem. The most common and most likely is that you have another program running that blocks port 80 or 443. If you installed Skype, you found your problem! Change the apache port settings to 81 and apache will work. There is a good tutorial on this. To verify this, you can open your command line by clicking the Start menu and typing "cmd" and enter the command

  netstat -nab 

this wil returns a list of programs that will vaguely resemble this template

  [someprogram.exe] UDP [fe80::numbers:numbers:numbers:numbers%numbers]:portnumber 

You need to find a line (or lines) ending in: 80, and complete them to start apache. If the line does not end with: 80, you can do more things.

First go to the xampp directory (the default is c: \ xampp) and double-click apache_start.bat. This will open the comand line and return more detailed errors about why apache cannot work. Basically, you need to look for syntax errors that you could create by editing the httpd.conf or httpd-ssl.conf files. This is very easy to do if you have edited it and become a new user.

If this fails, your last hope is to check the apache error log by clicking the log tab in the apache line in the xampp control panel and clicking the error log.

If none of this works, don’t give up! You got it!

Edit: If you change the apache port, you will also have to go to httpd.conf (located in xampp / apache / conf) and near line 184, replace

ServerName localhost:80

from

ServerName localhost:81

You can also specify port 81 in the URL of your local host, i.e.

local: 81 / my_project.php

+60
Jul 31 '13 at 17:56
source share
β€” -

1. Go to xampp/apache/conf/httpd.conf and open it.
In the httpd.conf file on line 176 Replace

ServerName localhost:80
from
ServerName localhost:81
That will work.

2. Even if the above procedure does not work. Then in the same file ( httpd.conf ) in line line 45 replace

  #Listen 0.0.0.0:80 #Listen [::]:80 Listen 80 

from

  #Listen 0.0.0.0:81 #Listen [::]:81 Listen 81 
+26
Mar 09 '14 at 18:29
source share

I found that the XAMPP control panel under Windows (Windows 7 in my case) does not reflect what actually happens if you do not start it using "Run as administrator".

+13
Mar 14 '14 at 0:50
source share

The accompanying Timmay answer, you need to make two changes -

Listen 80 β†’ Listen 81 (near line 58)

Localhost server_name: 80 -> localhost server_name: 81 (near line 218)

+10
Jan 02 '14 at 4:06
source share

just changed 2 lines

 Listen 80 to Listen 81 ServerName localhost:80 to ServerName localhost:81 

and start using administrator privileges

+8
Feb 25 '14 at 18:39
source share

Check if Skype is installed on your computer.

Log in and go to the "Tools" menu - "Options" - "Advanced" - check and uncheck the box that says that use port 80

-

Verify that the Apache service is installed by starting the services.msc service from the startup command line.

How to remove a service from the command line? sc remove "serviceName"

Remember that the service name must be replaced with the exact name of the Apache service, as shown in the list of services.

Check if IIS is running and is on port 80. If so, disable it.

-

Check if AVP (Kaspersky) is working and occupies port 80. If so, add httpd.exe as an exception to allowed programs.

-

Hope this helps.

+7
Oct 09 '13 at 9:32
source share

Have you run the "setup_xampp.bat" script? It is located inside the XAMPP folder and must be executed every time the XAMPP folder changes.

+5
Jul 31 '13 at 18:45
source share

I installed a VMWare workstation. So this caused an error.

 Services.msc and stopped the 'Workstation' Services. 

This solved my problems.

thank

+5
Feb 19 '15 at 16:36
source share

If you installed Skype, check this option.

enter image description here

Another case is Windows 10

Check this:

  • Go to the Start menu, enter services.msc
  • Scroll down in the Services window to search for the World Wide Web Publishing Service.
  • Right-click it and select Stop or Disable if you just want to use only XAMPP.

enter image description here

+5
Jul 14 '16 at 12:12
source share

I found that there was a similar problem on my system, and that was from skype installed before installing xampp. I have the same error. to fix the error, I followed them,

  • left skype for a while,
  • restarted apache from xampp control panel,
  • checked on the browser, regardless of whether it works or not, http: // localhost /
  • It worked,
  • connected to skype again
  • everything works fine, as simple as

I did not need to install and remove anything, and it worked for me in less than 1 minute.

amuses

+4
Jan 24 '15 at 6:32
source share

If you encounter this problem directly after a complete new installation on Windows :

It seems that the installer is already starting the http.exe process and blocking the initial port 80, but it does not reflect this status on the control panel.

To check, just check for a working server in your browser. Enter in the address bar of the browser:

local

If this displays the XAMPP control panel, everything is fine. In addition, check Task Manager for the running Apache HTTP Server process (httpd.exe).

You can stop the apache process with xampp_stop.exe in your xampp base folder. Then the XAMPP control panel should work as expected.

+2
Dec 08 '15 at 13:15
source share

In my case, the problem was that both ports 80 and 443 were used: Steps to fix it:

  • Open xampp and click configuration button
  • Now click on (Appache) httpd.conf (Open in notepad or another editor)
  • Now press ctrl + h .
  • Find 80 and replace with 8080
  • Now save and now click on Appache (httpd-ssl.conf).
  • Now find 443 and replace with 4430 .
  • Your xampp should now work fine, since both of these codes are never used by other programs on your system.
+2
Sep 19 '17 at 17:40
source share

If you installed SQL Express or any .NET server, you need to stop. open cmd in admin mode and enter this line ...

net stop was

now run apache

+1
Sep 14 '15 at 4:55
source share

$$$$$$$$ The best way to do this is $$$$$$$$$$

Other methods described above will make you stuck in many places. Do not proceed to changing the port

2 Step of the process

1) Open command prompt as administrator

2) enter "net stop http" (if it says that it does not identify the keyword, this only happens because your PATH environment variable does not contain the path to Program Files / System32, which you can find how to do this) Click Y in every place where he asks you, do not worry. You do not stop any important process only on some process that took your port. Annd, this process will again capture your port if you are not working.

Enjoy it!

+1
Jun 05 '17 at 6:42 on
source share

I have a solution. I had this problem and research the solution, but I failed. So I downloaded the new version of XAMPP and clicked on the netstats option in the program.
There he gave me a list of programs and the ports that they used, so I looked and didn’t have a program using port 80 , but apache outside 80 also uses port 443 ... and this program appeared called Pando Media Boster, I launched the dispatcher tasks and completed the pando Average boster process. Hope this helps :).

0
Feb 23 '14 at 2:08
source share

You may have changed the configuration file in "httpd-ssl.conf"

 <VirtualHost _default_:443> DocumentRoot "D:/Server/xServer" ServerName xyz.abc.com SSLCertificateFile "conf/ssl.crt/xyz.crt" SSLCertificateKeyFile "conf/ssl.key/sftaps.in.key" </VirtualHost> 

Maybe you are changing the name of the certificate or something in the Apache folder.

0
Mar 30 '17 at 12:19
source share

There can be many methods to solve this problem, but here is the simplest of them:

Go to XAMPP management and ...

Run as administrator

What all..

This is the Golden Dot for any such abnormality.

Work concept

In fact, all services in Xampp need a port dependency. What happens when there are no special permissions granted by xampp, it only searches for specific predefined ports to run these services. And, if in case, these ports are somehow already occupied ... eek! service cannot be started.

But if we give the superpower to our Xampp control (by launching it as an administrator), it will somehow manage and, of course, launch port services on the ground. And the triumph! You did it.

Permanent advice for my dear brother and sisters

To do your best, follow these steps:

  • right-click the xampp-control.exe file and go to the properties.
  • Click the Compatibility tab.
  • In the settings below, select the Run this program as administrator check box.
  • Apply changes. And you're done.

Now, every time you launch the application, it starts with administrator status, and you do not need to worry about ports at all.

0
Apr 09 '17 at 6:47
source share

Even if you configured Apache to listen on a different port, you still get this error if another program uses the default SSL port 443.

What you need to change is the http-ssl.conf file and change the line Listen to 443 and change the port number.

0
Aug 23 '17 at 9:45
source share

I also ran into the same problem. And I found an easy and quick solution.

The only thing you need to do is to start the XAMPP server as administrator every time.

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

-one
Dec 31 '15 at 10:54
source share

Sala

You do not need to change the port number.

go to the task manager and exit with any other running programs.

and then you can START APACHE .......

Respectfully,

-7
Apr 18 '14 at 22:16
source share



All Articles