Bytenap Networks

Bytenap-Network_color

XAMPP is one of the best beneficial development tools. But, at some point, you will run into issues and start receiving alerts like ‘Apache Shutdown Unexpectedly‘. This error might emerge from anywhere, hence identifying the cause of this error and offering a solution can be quite confusing.

Luckily, there is a simple clarification for Apache’s sudden shutdown. By doing some simple alterations, you should be able to resolve the issue and get Apache up and running again. You just need to update some settings in the configuration files.

In this blog post, we will be discussing the basic cause of this Apache error in XAMPP and then show you the ways to fix this Apache error in both Windows OS and macOS. Let’s get started!

Introduction to the XAMPP ‘Error: Apache Shutdown Unexpectedly’

For those who don’t know about XAMPP, let us tell you XAMPP is a free and open source server stack that incorporates the Apache server and MariaDB database:

error: apache shutdown unexpectedly
The XAMPP Website

The XAMPP operates PHP and Perl scripts and is utilized to develop and test dynamic sites on local systems. This implies that if you are creating a website, you can install WordPress locally on your system. You can use XAMPP to test your website’s files offline before uploading them to a server like cheap Linux VPS hosting or cheap shared hosting.

If you are reading this article, we believe you already are somewhat familiar with XAMPP. But, what might be new for you is the ‘Apache Shutdown Unexpectedly‘ error that you are encountering.

This Apache error is usually caused due to a blocked port. In other words, this error is caused because another application installed on your system is using the same port as XAMPP. Moreover, you may observe that the error message signifies the issue may likewise be attributed to “missing dependencies, incorrect privileges, a crash, or a shutdown by another method.”

How to Fix the XAMPP ‘Error: Apache Shutdown Unexpectedly’ in Windows

If you work on a Windows device, you can follow the below steps to modify your default port settings in XAMPP.

Open the Configuration Settings from the XAMPP Control Panel

The first and the foremost step to launch XAMPP. You can do so by clicking on XAMPP icon. This will open the XAMPP control panel. Here, you can do the configuration setting for the server stack.

As our error is linked to Apache, we will concentrate on those settings. In the ‘Apache’ row of options, click on the Config button

error: apache shutdown unexpectedly
XAMPP Control Panel

This will be opening a drop-down menu of files. We are going to edit these files starting with httpd.conf.

Change the Default Port Settings of the httpd.conf File

From the file menu, click on Apache(httpd.conf). Once you open the file in your computer’s default text editor:

error: apache shutdown unexpectedly
Apache httpd.conf

Inside this file, you can find three settings that you want to update. To begin with this, press Ctrl +F, then enter “80” in the search field:

error: apache shutdown unexpectedly
httpd.conf file in Windows

This will show all the instances of the number 80 in the file. Search for ‘Port 80’ and change it to ‘Port 8080’. Once the port setting is changed, look for ‘ Listen 80’ and update it to ‘Listen 8080’.

Last but not least look for ‘servername localhost:80’. On finding it, change it to ‘servername localhost:8080’. Once you have made the changes, don’t forget to save the file and close it.

Update the Default Port Settings in the http-ssl.conf File

Next, let’s go to the second file. You can do this by returning to the XAMPP control panel, then choose Config beneath the Apache settings again. This time, you need to open the Apache (http-ssl.conf) file.

While the file opens in your text editor, press Ctrl + F, and later enter 443 in the search field. Locate “Listen 443” and modify it to “Listen 4433”.

Next, search the file for the next instance of “443”. It should be “<VirtualHost _default_:443>”. On finding it, you can move forward and modify it to “<VirtualHost _default_:4433>”. When you have accomplished it, don’t forget to save and close the file.

Restart Apache

On updating the settings in both files, the last step is to prevent Apache. You can do this by clicking on the Stop button along the corresponding Apache row. After Apache has been halted, click the Start button to finish the process of restarting.

Now, Apache should run fine.

How to Fix the XAMPP ‘Error: Apache Shutdown Unexpectedly’ in macOS

Depending on what version of macOS you are running, you may likely have Apache installed on your system. the default apache application in mac will be using the same default port settings as the Apache server in XAMPP. Hence, this may be the reason for the ‘Apache Shutdown Unexpectedly’ error.

If you are using macOS, you can follow the following steps to update the default port settings.

Open the XAMPP Apache Configuration

To start fixing the ‘Apache Shutdown Unexpectedly’ error, ofcourse you will need to open the XAMPP Application Manager.

Next, pick the Manage Servers tab adjacent to the Welcome tab at the top:

open-the-xampp-apache-configuration
Manage Server Settings

On screen, you will find a list of choices. Pick the Apache Web Server, from the list and click on the Configure button.

Open the Conf File

From the Configure Apache Web Server box, choose the Open Conf File:

A warning box that state the file is for advanced users will pop up

open-the-conf-file
XAMPP Conf Warning

You can click on Yes button to continue. This will open the httpd.conf file

Update the Port Settings

On opening the file in your text editor, the subsequent step is to update the port settings. You can do so by pressing Ctrl + F and then entering “80” in the search field. This will present instances of the number 80:

Look for these lines

#Listen 12.34.56.78:80
Listen 80
Once you do, go ahead and change them to the following:
#Listen 12.34.56.78:8080
Listen 8080

Once you have done al the steps don’t forget to save and close the file. In the Configure Apache Web Server box, click on OK.

Restart Apache

The last step is to halt and restart the Apache, you can do so by going to XAMPP  Application Manager’s Manage Servers tab. Once Apache is stopped, click on Start to restart:

That’s it! Your port numbers will be updated and Apache should now run without any complications.

Conclusion

We hope, this blog post helped you understand how to fix the XAMPP Error ‘Apache Shutdown Unexpectedly

Additionally, you can check out the Managed WordPress Hosting plans that come with SSD storage and guarantee speed boost.

Social Media

Stay Informed For Online World & Business Updates!

Scroll to Top

Linux Reseller Hosting Comparison Plan

LR-S LR-M LR-XL LR-XXL
SSD Disk
100GB
200GB
Unlimited
Unlimited
Bandwidth
Unlimited
Unlimited
Unlimited
Unlimited
cPanel Accounts
20
40
60
100
Free Migration
Free SSL Certificates
Domain Hosted
Unlimited
Unlimited
Unlimited
Unlimited
FREEBIES
350+ one click Script Installer
Weekly Backups
Free SSL Certificates
CloudFlare CDN
Domain Reseller Account
RESELLER FEATURES
Private Name Servers
WHM Panel
Client Backup Restores
Per cPanel SSH Access
ACCOUNT RESOURCES
Add-On Domains
Unlimited
Unlimited
Unlimited
Unlimited
Sub-domains
Unlimited
Unlimited
Unlimited
Unlimited
Parked Domains
Unlimited
Unlimited
Unlimited
Unlimited
Databases
Unlimited
Unlimited
Unlimited
Unlimited
FTP Accounts
Unlimited
Unlimited
Unlimited
Unlimited
CPU Core
1 Core
1 Core
1 Core
1 Core
RAM
1 GB
1 GB
1 GB
1 GB
Entry Processes
20
20
20
20
IO Speed
4 MB/s
4 MB/s
4 MB/s
4 MB/s
SERVER FEATURES
LiteSpeed Web Server
PHP v5.6 to latest
MySQL / MariaDB
Web Application Firewall
Caching
CloudFlare CDN
CloudLinux
CageFS
DDoS Protection
Server Locations
US | CA | DE
SECURITY FEATURES
DDoS Protection
Web Application Firewall
Brute-Force Protection
Brute-Force Protection
Two-Factor Authentication
Email Virus Scanner
CageFS Account Isolation
ByteNAP ASSURANCES
Uptime Guarantee
24x7x365 Support
Live Chat Support
Free Migration
Cancel Anytime
Instant Setup
AVAILABLE ADDONS
Instant SetupDedicated IP
$4.5/Mo
$4.5/Mo
$4.5/Mo
$4.5/Mo
Upgrade to Daily Backups
$5/mo
$5/mo
$5/mo
$5/mo

Managed Services

Managed Support

Get fully managed support from Experts
with Pro Active monitoring

Domain

Domain Registration

Register Domain Today

Domain Transfer

Domain Transfer are Quick, Easy &
Affordable

Email

Cloud Mail

Connect & Collaborate with Customers

Google Workspace

Create, Communicate & Collaborate

Security & Backup

SSL Certificate

Secure Your Data & Transactions with SSL Certificate

BitNinja

Secure your Webpages with BitNinja Server

Acronis Cloud Backup

Secure Data Backup for Businesses of All Sizes

Servers

Bare Metal Servers

Solid Performance Bare Metal Server

GPU Servers

Next-Generation GPU Server

Clearance Servers

Stable Clearance Dedicated Server

Cloud VPS

Linux VPS

Get Faster Loading Speed with Linux VPS Hosting

Windows VPS

Leading Windows VPS Hosting

Managed Linux VPS

Powerful Managed Linux VPS Hosting

Managed Windows VPS

Realiable Managed Windows VPS Hosting

Hosting

Linux Hosting

Feature Packed Linux Hosting

Windows Hosting

Stable Windows Hosting Server

Wordpress Hosting

Best & Secure WordPress Hosting

Linux Reseller Hosting

Start Business with Linux Reseller Hosting

Windows Reseller Hosting

White-label Windows Reseller Hosting