After installing XAMPP and try to start the Apache server in the XAMPP Control Panel, sometimes you face error like Apache shutdown unexpectedly. The issue is caused because of other services like WordPress, IIS server or sometimes skype used the same port i.e 80 or 443 on the machine you are using.
Try following below steps to resolve the issue:
Step 1 - From the XAMPP Control Panel, under Apache, click the Config button, and select the Apache (httpd.conf).
Inside the httpd.conf file, a line that says:
Listen 80
And change the 80 into any number/port you want eg. port 8080.
Listen 8080
Now check httpd.conf file for another line that says:
ServerName localhost:80
Change 80 to 8080.
ServerName localhost:8080
Step 2 - From the XAMPP Control Panel, under Apache, click the Config button again, but this time select the Apache (httpd-ssl.conf). Inside the httpd-ssl.conf file, find line that says
Listen 443
And change the 443 into any number/port you want eg. 4433 as the new port number.
Listen 4433
Still from the httpd-ssl.conf file, find another line that says
<VirtualHost _default_:443>
ServerName localhost:443
And change 443 to 4433.
<VirtualHost _default_:4433>
ServerName localhost:4433
Remember to save the httpd.conf and httpd-ssl.conf files after performing some changes. Then restart the Apache service.
Hope this will resolve your issue.