---restore content starts---
Today, when you start Apache in Xampp, you encounter this problem:
14:42:24 [Apache] error:apache shutdown unexpectedly.
14:42:24 [Apache] This is due to a blocked port, missing dependencies,
14:42:24 [Apache] improper privileges, a crash, or a shutdown by another method.
14:42:24 [Apache] Press the Logs button to view error Logs and check
14:42:24 [Apache] The Windows Event Viewer for more clues
14:42:24 [Apache] If you need + Help, copy and post this
14:42:24 [Apache] entire log window on the Forums
This error occurs because the port is occupied
We only need to modify port (s) to:
- First open the XAMPP Control Panel and locate the Apache config file:
Click the Config button, and select the Apache (httpd.conf).
Inside the httpd.conf file, find this line:Listen and this line:ServerName localhost:80, the N Change the number "a" to the any number you like,for example: "8080". Remember to save the this file.
- Then select the Apache (httpd-ssl.conf). Inside This file, we should find three lines:
- Listen 443
- <virtualhost _default_:443>
- ServerName www.example.com:443 Then we can change the number of "443" to any number we like, for example "4433" . Last we should save this file.
3. Restart the Apache service.
We can see this when we restart the Apache service:
And this:
15:01:32 [Apache] Problem detected!
15:01:32 [Apache] Port, use by "C:\Program Files (x86) \apache software Foundation\apache2.2\bin\httpd.exe"-K runs Ervice "with PID 2820!
15:01:32 [Apache] Apache would not start without the configured ports free!
15:01:32 [Apache] need to uninstall/disable/reconfigure the blocking application
15:01:32 [Apache] or reconfigure Apache and the Control Panel to listen on a different port
15:01:32 [Apache] attempting to start Apache app ...
15:01:32 [Apache] Status Change detected:running
It means we solve this problem.
Then we move to another problem:when we open the localhost and we see this:
To solve the problem, we should change ' localhost ' to ' localhost:8080 ' ("8080" is your number which you have changed)
Just like this:
---restore content ends---
XAMPP Error: Apache shutdown unexpectedly workaround & how to turn on localhost after changing the Apache port number by Yojiaku