XAMPP is a developmental server used by many techies. This popularity stems from its effectiveness and simplicity. However, it comes with its fair share of bugs. One of the most reported case is the error message apache shutdown unexpectedly. At first glance, the obvious guess would be that the error message is caused by a program or application already using the active port. There are two ways to go about resolving the above problem.
Fix xampp error apache shutdown unexpectedly
Method 1: Changing the default port of XAMPP
Try changing the port from the system default 80 to another port, for example, 7777. Here is how to do it;
- Go to the XAMPP control panel and click on Apache configuration button. It is under the button labeled “logs”.
- Choose ‘Apache (httpd.comf)’ from the resulting drop down menu. Notepad opens up.
- Press Ctrl + F so as to find the default port number. Change it from Listen 80 to the new port that you prefer (or, as above, Listen 7777).
- Also find the line ServerName localhost:80 and change it to ServerName localhost:7777
- Save your new settings.
- Restart Apache.
Apache should be running seamlessly now. Stop the service or application that is making use of the 80 port.
Method 2: Stop the application / service using the 80 port
If you want to maintain 80 as your preferred port, you have to zero in on the program or application that is occupying port 80. Skype is a popular culprit; but you may have other programs using it as well. Do the following
- Open Apache
- Go to Tools – Options – Advanced – Connection.
- Uncheck the box that says “use port 80 and 443 as alternative for incoming connection”
- Close Skype (or the program that you identified using the 80 port).
- The changes will register.
- Restart Apache in XAMPP.
You are sorted. if you still facing same problem or if you have any other working solution feel free comment below or submit your article.