XAMPP is a helpful development tool. However, you may run inkhổng lồ problems at some point, such as receiving the notification: “Apađậy shutdown unexpectedly”. This error might seem to lớn come out of nowhere, so identifying the cause – let alone the solution – can be puzzling.
Bạn đang xem: Apache shutdown unexpectedly due to blocked port
Fortunately, there is a comtháng explanation for Apache’s sudden shutdown. With a few simple modifications, you should be able to fix the problem and get Apabít up và running again. All you have sầu to lớn vì is update some settings in the configuration files.
In this article, we’ll discuss the common cause of this Apađậy error in XAMPPhường & then walk you through four steps khổng lồ fix it, both on Windows & macOS.
Let’s get started!
XAMPP. is a không tính phí, open source VPS staông chồng that includes the Apađậy server and MariaDB database:
It runs PHP & Perl scripts, and is used lớn develop & test dynamic websites on local machines. This means that if you are building a trang web, you can install WordPress locally on your computer. You can use XAMPP without having to upload your site’s files to your website hosting service.
If you’re reading this article, we’ll assume you’re already at least somewhat familiar with XAMPP. However, what may be new lớn you is the “Apache shutdown unexpectedly” error you’re seeing.
This message is most commonly caused by a blocked port. Usually, it means that another application installed on your computer, such as Skype, is using the same port as XAMPPhường. Additionally, you may notice that the error message indicates the problem may also be attributed lớn “missing dependencies, improper privileges, a crash, or a shutdown by another method.”
In any sự kiện, the easiest fix is lớn simply modify the XAMPP mặc định settings. However, the method for resolving the error varies slightly between Windows và macOS. Also, the interface may look a bit different depending on the XAMPPhường version you’re using. We will provide instructions for both operating systems below, starting with Windows.
Looking for a miễn phí and powerful local WordPress development tool? Devnhlhockeyshopuk.com features quiông chồng and easy site creation, gmail & database management tools, one-clichồng PHP version switching, & full integration with Mynhlhockeyshopuk.com. Get started with Devnhlhockeyshopuk.com today, even if you’re not a nhlhockeyshopuk.com customer.
If you’re using a Windows device, you can follow these four steps to lớn update your mặc định port settings in XAMPP.
The first step is, of course, khổng lồ launch XAMPPhường. This will open the XAMPPhường control panel. From here, you can update the configuration settings for the hệ thống staông chồng.
Since this error is related lớn Apabịt, we’ll focus on those settings. In the “Apache” row of options, click on the Config button.
This will open a drop-down menu of files. We’re going lớn be editing two of these files, starting with httpd.conf.
From the thực đơn of files, cliông xã on Apache (httpd.conf). Once you vì, the tệp tin will open in your computer’s mặc định text editor:
Within this file, there are three settings you’ll want khổng lồ update. To get started, press Ctrl + F, then enter “80” in the search field:
This will display all instances of the number 80 in the file. Locate “Port 80” & change it lớn “Port 8080”. Once the port setting is updated, tìm kiếm for “Listen 80” and update it to lớn “Listen 8080”.
Finally, tìm kiếm for “servername localhost:80”. Once you find it, modify it to “servername localhost:8080”. When you’re finished, save sầu and cchiến bại the tệp tin.
Now it’s time to move sầu on lớn the second file. To vị so, you can return lớn the XAMPPhường control panel, then select Config under the Apache settings again. This time, open the Apache (http-ssl.conf) file.
When the tệp tin opens in your text editor, press Ctrl + F, and then enter 443 in the tìm kiếm field. Locate “Listen 443” and update this khổng lồ “Listen 4433”.
Xem thêm: Cách Dùng Google Map Khi Không Có Mạng Trên Android, Google Maps Trên App Store
Next, search the file for the next instance of “443”. It should be “”. Once you find it, you can go ahead and change it to “”. When you’re finished, remember to save sầu & cchiến bại the tệp tin.
Once you’ve sầu updated the settings in both files, the final step is to lớn stop Apache. You can vày this by clicking on the Stop button along the same Apache row. After Apabít has been stopped, click the Start button to complete the restart process.
That’s it! Your port numbers will be updated và Apache should now run without error.
Depending on what version of macOS you’re running, you may already have sầu Apabít installed on your computer. This default application of Apabít will use the same mặc định port settings as the Apache hệ thống in XAMPPhường, so this may be the cause of the “Apabít shutdown unexpectedly” error.
If you’re using macOS, you can follow these four steps to update the default port settings.
To start, open the XAMPPhường Application Manager if you haven’t already done so:
Next, select the Manage Servers tab next lớn the Welcome tab at the top:
On this screen, you’ll find a list of options. You can cliông xã on Apađậy Web Server, followed by the Configure button.
From the Configure Apabịt Web Server box, select Open Conf File:
A warning box will appear, stating that the tệp tin is for advanced users:
You can cliông chồng on Yes to lớn continue. This will open the httpd.conf tệp tin.
Once the file opens in your text editor, the next step is khổng lồ update the port settings. To bởi so, you can hit Ctrl + F, and then enter “80” in the search field. This will display instances of the number 80:
Locate the these lines:
#Listen 12.34.56.78:80Listen 80Once you vì, go ahead and change them lớn the following:#Listen 12.34.56.78:8080Listen 8080When you’re done, you can save sầu và cthua the file. In the Configure Apache Web Server box, cliông xã on OK.
The final step is to lớn stop và restart Apađậy, which you can bởi vì from the XAMPP Application Manager’s Manage Servers tab. Once Apache is stopped, click on Start khổng lồ restart:
That’s it! Your port numbers will be updated và Apabịt should now run without error.
The XAMPP error “Apabít shutdown unexpectedly” is commonly caused by another program, such as Skype, using the default Apađậy port. While this can be frustrating, it usually has a simple resolution.
As we discussed in this article, the easiest way khổng lồ fix this problem is to lớn update XAMPP’s Apabít configuration settings. You can vày this by editing the httpd.conf file & the http-ssl.conf tệp tin (for Windows users). Once this is done, you should stop and restart Apabít lớn resume normal operation.
Save time, costs và maximize site performance with:
Instant help from WordPress hosting experts, 24/7.Cloudflare Enterprise integration.Global audience reach with 29 data centers worldwide.Optimization with our built-in Application Performance Monitoring.All of that and much more, in one plan with no long-term contracts, assisted migrations, và a 30-day-money-back-guarantee. Cheông xã out our plans or talk to sales to find the plan that’s right for you.