Last modified on April 29th, 2020
“Apache shutdown unexpectedly due to Blocked Port – Solved” is the today topic of discussion in this tutorial.
Why Apache shutdown unexpectedly?
Sometimes some other software use the assigned port and XAMPP is unable to use the port. Mostly this occurs, when you are also using the Skype or Visual Studio.
How to resolve the Blocked Port problem in XAMPP?
If you have encountered this error, you can use the following method to fix it.
Method: Changing XAMPP Default Port
Step 1: Open Xampp control panel. Click on config – Apache. Then select Apache(httpd.conf), that will be the first on the list. This will open in notepad.
Step 2: Press “Ctrl+F” and find “listen 80” and change it to “8012” or “some times need to change it to 81”.
Step 3: Again find “ServerName localhost:80” and change it to “localhost:8012” or “some times need to change it to localhost:81”.
Then save these changes and restart Apache, it should work now.
By doing this, now you will have to write “localhost:8012” instead of “localhost” in the URL.
Now how you search:
write “localhost:portnumber/folder” e.g “localhost:8012/folder”