HOW TO FIX “APACHE SHUTDOWN UNEXPECTEDLY ERROR”

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

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:
- 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.

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!

