Reputation: 21
Error: Apache shutdown unexpectedly.
11:58:07 [Apache] This may be due to a blocked port, missing dependencies,
11:58:07 [Apache] improper privileges, a crash, or a shutdown by another method.
11:58:07 [Apache] Press the Logs button to view error logs and check
11:58:07 [Apache] the Windows Event Viewer for more clues
11:58:07 [Apache] If you need more help, copy and post this
11:58:07 [Apache] entire log window on the forums
I can't start the server, the errors above appear when I try to
Upvotes: 2
Views: 1201
Reputation: 1904
Open XAMPP Control Panel and select Config under Apache. Select your httpd.conf and locate the following line.
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen **xx**
Where you see xx change this to something like 8080 if it currently states 81. Port 81 is commonly used by a few applications, so I tend to always change to 8080 by default, but your network may be different. You may use netstat
to see what ports may be available to you.
Restart XAMPP entirely as Apache is very fussy, then try starting Apache again.
Upvotes: 1
Reputation: 15703
Apache by default use 80 port if that port is alrady occupied by some other programs may lead to this issue. Following steps to resolve this :
Step 1 - From the XAMPP Control Panel, under Apache, click the Config button, and select the Apache (httpd.conf).
Inside the httpd.conf file, somehow I found a line that says:
Listen 80
And change the 80 into any number / port you want. In my scenario I’m using port 8080.
Listen 8080
Still from the httpd.conf file, I found another line that says:
ServerName localhost:80
Change 80 to 8080.
ServerName localhost:8080
Save httpd.conf file after done with changes
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. I’ll using 4433 as the new port number.
Listen 4433
Still from the httpd-ssl.conf file, find another line that says
ServerName localhost:443
And change 443 to 4433.
ServerName localhost:4433
Save httpd-ssl.conf files after done with changes
P.S : Restart the Apache service.
Upvotes: 1