HOW TO FIX “APACHE SHUTDOWN UNEXPECTEDLY ERROR”

Lois Bassey
Nov 4 · 3 min read

So, I opened up my xampp control panel today and tried starting Apache but I could not do so, was told again and again that the port 80 which I am using for apache is already in use by an internal application. I am guessing a system application because I recently reinstalled all my network drivers. So, if you have encountered an issue like this before; Say Cheese! Cause you’re not alone! #chuckles.

How did I fix this issue? Well I did some reconfiguration, but before I go into the detail, here is a snapshot of the error I got when I tried firing up apache in my xampp control panel

If you also have this error, come closer.. This fix is going to be a time saver!

The first fix was to check if skype was making use of the port. This may be an issue too for some users found this to be so in their case, but then it does not work efficiently in most cases. A better and faster fix for me was to do this:

  1. Click on the config button for apache in your xampp control panel, a list of options will show up. Click on Apache (httpd.conf), this will open up this .conf file in your notepad text editor. Once it is opened, look for the following lines :

Listen 80 (Change the port number here to 8080 or any port number of your choosing)

ServerName localhost:80 (Change the port number here also to 8080 or any port number of your choosing)

Once the changes have been made, save the changes and close the file. Then perform the next step.

2. Once again, click on the config button for apache in your xampp control panel, a list of options will show up. Click on Apache (httpd-ssl.conf), this will open up this .conf file in your notepad text editor. Once it is opened, look for the following lines :

Listen 443 (Change the port number here to 4433 or any port number of your choosing)

<VirtualHost _default_:443> (Change the port number here to 4433 or any port number of your choosing)

ServerName www.example.com:443 (Change the port number here to 4433 or any port number of your choosing)
Once the changes have been made, save the changes and close the file.

Please remember to save the httpd.conf and httpd-ssl.conf files after performing the above mentioned changes. Then restart the Apache service.

If you notice, the port numbers have been changed respectively and the apache service is running well.

It worked for me like a charm! Hope it does so for you too. Please do not forget to clap if you found this published story informative and useful! Thanks and do have a lovely day ahead of you!

Hasta Lavista!

Lois Bassey

Written by

A fullstack web developer and a techwriter when the need arises.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade