Xampp server Error

I can’t run the xampp server it gives me a Apache shutdown unexpectedly

This problem occurred because apache server port is allocated which is 80. maybe you changed that port to something else you can check that form config button in xampp in apache

Solution 1


Choose httpd.conf and it will open in default document Notpad, search on Listen You can use CTRL+F to search easier
Make sure Listen port is 80

Listen 80

and ServerName localhost:80 are the same port

ServerName localhost:80

If you want to change the port you should change it in both ServerName and Listen
For example

Listen 8011
ServerName localhost:8011

Save changes and restart the server

Solution 2

Click config button in xampp then service and port settings button
and choose main port for Apache server

But not recommended because sometime if you close server or closed a computer maybe it backs to default port 80

1 Like