Error apache shutdown unexpectedly как исправить

As I am working in a corporate environment where developers faces firewall issues, none of the other answers resolved my issue.

As the port is not used by Skype, but by some other internal applications,
I followed the below steps to resolve the issue:

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

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

<VirtualHost _default_:443>

ServerName localhost:443

And change 443 to 4433.

<VirtualHost _default_:4433>

ServerName localhost:4433

Remember to save the httpd.conf and httpd-ssl.conf files after performing some changes. Then restart the Apache service.

Themeisle content is free. When you purchase through referral links on our site, we earn a commission. Learn More

Technical errors are rarely a welcome sight, especially if they interrupt your workflow. If you’re using XAMPP for local development, you might have run into a particularly confusing message that reads, “XAMPP error Apache Shutdown Unexpectedly”. Finding a way to quickly resolve this vague issue so you can get back to work can be frustrating.

Fortunately, troubleshooting it is often actually quite simple. All you need is a text editor to reconfigure a few simple settings in your XAMPP files. In a few moments, you can eliminate this error and get back to building your latest project.

In this article, we’ll cover what the “XAMPP error Apache shutdown unexpectedly” message means so you can better understand it. Then, we’ll take you through four simple steps to fix the problem with tools that are likely already at your disposal. Let’s dive right in!

XAMPP is a powerful and popular development tool. You can use it to build a site on a local server. This is useful for creating new websites, as well as testing out changes, updates, and new plugins or themes on existing websites.

Unfortunately, this doesn’t mean that XAMPP always works perfectly. Despite being well-designed, there’s always a chance that something will go wrong. In the case of the “XAMPP error Apache shutdown unexpectedly” message, this problem can be particularly frustrating.

This warning appears when you try to boot up XAMPP. Moreover, that’s not always the only error message you’ll see. You could also receive some debugging information, such as text similar to the following:

Error: Apache shutdown unexpectedly. This may be due to a blocked port, missing dependencies, improper privileges, a crash, or a shutdown by another method. Check the "/xampp/apache/logs/error.log" file and the Windows Event Viewer for more clues.

That’s a lot of information in one message. As such, it’s easy to become intimidated by all the possible causes of this issue. Furthermore, knowing how to interpret all these details can be even harder if you’re not well-versed in the relevant technology.

Fortunately, the root issue is typically pretty simple. This error message usually means that there’s another program that’s using the same port that XAMPP does by default.

A port is a network connection point used by a variety of programs. Each port only supports one program at a time. Therefore, if another application is blocking the port XAMPP typically connects to, it will prevent the platform from starting up.

Oftentimes, the culprit in this situation is Skype, as it uses the same default port as XAMPP. However, it might be another program. Trying to troubleshoot exactly which application is causing the issue can be a headache. That’s why we’ll be going straight to XAMPP’s files to fix this issue.

How to resolve the “XAMPP Error Apache Shutdown Unexpectedly” message (in 4 steps)

If you’ve never dealt with configuration files before, don’t worry. This process should be fairly simple. Additionally, all you’ll need is your XAMPP installation and a text or code editor.

Step 1: Launch the XAMPP Apache configuration settings

First, go ahead and launch the XAMPP dashboard. The program itself doesn’t have to operate. As long as you can access your dashboard, you should be able to resolve the error.

Additionally, try running XAMPP as an administrator. You can do this by right-clicking on the program and selecting Run as administrator. This isn’t crucial for this walkthrough, but it can prevent occasional unrelated errors.

Once you’ve launched XAMPP, navigate to the row titled Apache under the heading Module. Under Actions, select Config:

The launch menu for XAMPP.

Note that when you see the “XAMPP error Apache shutdown unexpectedly” message, that means that the issue is specifically related to Apache. Therefore, you’ll need to click on that specific Config button to properly fix it. None of the other rows in this window will work.

Clicking on the Config button will open a dropdown menu listing a few file names. Each represents a configuration file for the program. Choose the first option, titled Apache (httpd.conf):

Apache Httpd

You can either open it with your default text editor, or a specialized code editor. As long as you can make changes to the file and save them, how you do so doesn’t really matter. We’ll be using Notepad.

Once you open the httpd.conf file, you’ll see some text similar to the following:

A sample configuration file for Apache.

Once again, this can be a bit intimidating if you’re new to editing configuration files. The good news is that you’ll only need to modify a few simple things.

However, we do recommend that you proceed with caution. Configuration files often carry information that is essential for a program’s normal operation. Therefore, try not to edit anything that you don’t understand. You may also want to save a backup of this file before you proceed to the next step.

Step 2: Change your default port settings in httpd.conf

As we already mentioned, when you see the “XAMPP error Apache shutdown unexpectedly” message, it’s almost always a problem with a blocked port. As such, we’ll be changing the ports that the program normally uses to connect to your network.

Unless you’ve changed it before, the default port for Apache is 80. Port 80 is specifically for HTTP programs. However, it’s not just the default for Apache. Many other programs will use port 80 as well, which can lead to conflicts if you try to run multiple programs on this port at once.

To solve this issue, you need to redirect Apache to port 8080. This is an alternate HTTP-specific port. As such, XAMPP will continue to work as normal, but with less likelihood that its port will become blocked again in the future. As such, this is also a preventative measure against future port conflict errors.

Let’s get back to the configuration file. Press Ctrl + F to open a search dialogue. Enter 80 into the field to find every instance of the number in the file:

Opening a search dialogue for port 80 in httpd.conf to resolve the XAMPP error apache shutdown unexpectedly message.

There will probably be a handful of instances where 80 occurs. However, you only need to change a few of them. Specifically, you’ll need to change three items:

  1. Change Port 80 to Port 8080
  2. Change Listen 80 to Listen 8080
  3. Change servername localhost: 80 to servername localhost: 8080

Once again, we encourage you to only change these three items. Not only will modifying unrelated lines not solve this error, but it could also cause another one. If you accidentally edit the wrong element, you can restore your own backup or find the default Apache file on Github.

Save the httpd.conf file and close it when you’re finished making these changes. Then go back to your XAMPP control panel for the last step.

Step 3: Update your default port settings in http-ssl.conf

Lastly, we’ll be editing one final configuration file. To access it, repeat the instructions from Step 1. Go to the Apache row under Module and select Config. However, this time, click on the second option in the dropdown menu, titled Apache (httpd-ssl.conf):

Apache ssl configuration

Open up the text file in your preferred editor. However, this time you won’t be searching for 80. Instead, hit Ctrl + F and search for the number 443.

Port 443 is the port that is typically used for secure web transactions. However, Apache also needs it. Therefore, you need to change two instances of 443 to the alternative port – 4433:

  1. Change Listen 443 to Listen 4433
  2. Change <VirtualHost_default_:443> to <VirtualHost_default_:4433>

Be sure to save your work in this file as well. Once you’re done, close your text or code editor.

Step 4: Restart Apache

The next thing you want to do is restart Apache. This will reset the processes so that Apache can use the new alternate ports you’ve specified.

How to restart Apache on XAMPP

Restarting Apache is easy to do and somewhat intuitive:

  • Click the Stop button on the Apache row.
  • After Apache stops, click the Start button to restart it again.

If for some reason that doesn’t work, then you might need to completely shut down XAMPP and relaunch it. In most cases that shouldn’t be necessary though. The stop-start method should do the trick.

Upon restart, everything should work normally. Your control panel should look something like this:

A properly operating XAMPP dashboard with no Apache error.

From here, you should be able to click on Start next to Apache and continue with your work on your local site. Remember to not use ports 8080 or 4433 for any other programs, or you may have to repeat this process.

Once you have resolved this error, you may want to investigate other programs to see which one is taking up Apache’s default ports. If you decide to adjust another program’s settings to disconnect it, you can repeat these steps to reconnect XAMPP to ports 80 and 443.

Conclusion

Having to troubleshoot an error when you’re in the middle of a development project is annoying and eats up valuable time. Apache errors in particular can be aggravating. Fortunately, by altering a few configuration files, you can quickly resolve this frustrating roadblock.

In this article, we covered four easy steps to resolve the “XAMPP error Apache shutdown unexpectedly” message:

  1. Launch the Apache configuration settings from the XAMPP dashboard.
  2. Open the httpd.conf file and change the default port from 80 to 8080.
  3. Open the http-ssl.conf file and change the default port from 443 to 4433.
  4. Restart Apache.

Finally, if you regularly have problems with XAMPP, there are lots of other local development tools that you can consider, such as DesktopServer, Docker, or Vagrant.

Do you have any questions about resolving the “XAMPP error Apache shutdown unexpectedly” message? Let us know in the comments section below!

XAMPP is a helpful development tool. However, you may run into problems at some point, such as receiving the notification: “Apache shutdown unexpectedly”. This error might seem to come out of nowhere, so identifying the cause – let alone the solution – can be puzzling.

Fortunately, there is a common explanation for Apache’s sudden shutdown. With a few simple modifications, you should be able to fix the problem and get Apache up and running again. All you have to do is update some settings in the configuration files.

In this article, we’ll discuss the common cause of this Apache error in XAMPP and then walk you through four steps to fix it, both on Windows and macOS.

Let’s get started!

An Introduction to the XAMPP “Apache Shutdown Unexpectedly” Error

XAMPP is a free, open source server stack that includes the Apache server and MariaDB database:

The XAMPP website.

The XAMPP website.

It runs PHP and Perl scripts, and is used to develop and test dynamic websites on local machines. This means that if you are building a website, you can install WordPress locally on your computer. You can use XAMPP without having to upload your site’s files to your web 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 to 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 XAMPP. Additionally, you may notice that the error message indicates the problem may also be attributed to “missing dependencies, improper privileges, a crash, or a shutdown by another method.”

In any event, the easiest fix is to simply modify the XAMPP default settings. However, the method for resolving the error varies slightly between Windows and macOS. Also, the interface may look a bit different depending on the XAMPP version you’re using. We will provide instructions for both operating systems below, starting with Windows.

How to Fix the XAMPP Error “Apache Shutdown Unexpectedly” in Windows

If you’re using a Windows device, you can follow these four steps to update your default port settings in XAMPP.

Step 1: Open the Configuration Settings from the XAMPP Control Panel

The first step is, of course, to launch XAMPP. This will open the XAMPP control panel. From here, you can update the configuration settings for the server stack.

Since this error is related to Apache, we’ll focus on those settings. In the “Apache” row of options, click on the Config button.

The XAMPP control panel in Windows.

The XAMPP control panel in Windows.

This will open a drop-down menu of files. We’re going to be editing two of these files, starting with httpd.conf.

Step 2: Change the Default Port Settings of the httpd.conf File

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

The Apache (httpd.conf) file in XAMPP control panel.

The Apache (httpd.conf) file in XAMPP control panel.

Within this file, there are three settings you’ll want to update. To get started, press Ctrl + F, then enter “80” in the search field:

The Apache httpd.conf file in Windows.

The Apache httpd.conf file in Windows.

This will display all instances of the number 80 in the file. Locate “Port 80” and change it to “Port 8080”. Once the port setting is updated, search for “Listen 80” and update it to “Listen 8080”.

Finally, search for “servername localhost:80”. Once you find it, modify it to “servername localhost:8080”. When you’re finished, save and close the file.

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

Now it’s time to move on to the second file. To do so, you can return to the XAMPP control panel, then select Config under the Apache settings again. This time, open the Apache (http-ssl.conf) file.

When the file opens in your text editor, press Ctrl + F, and then enter 443 in the search field. Locate “Listen 443” and update this to “Listen 4433”.

Next, search the file for the next instance of “443”. It should be “<VirtualHost _default_:443>”. Once you find it, you can go ahead and change it to “<VirtualHost _default_:4433>”. When you’re finished, remember to save and close the file.

Step 4: Restart Apache

Once you’ve updated the settings in both files, the final step is to stop Apache. You can do this by clicking on the Stop button along the same Apache row. After Apache has been stopped, click the Start button to complete the restart process.

The option to stop Apache in XAMPP.

The option to stop Apache in XAMPP.

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

How to Fix the XAMPP Error “Apache Shutdown Unexpectedly” in macOS

Depending on what version of macOS you’re running, you may already have Apache installed on your computer. This default application of Apache will use the same default port settings as the Apache server in XAMPP, so this may be the cause of the “Apache shutdown unexpectedly” error.

If you’re using macOS, you can follow these four steps to update the default port settings.

Step 1: Open the XAMPP Apache Configuration

To start, open the XAMPP Application Manager if you haven’t already done so:

The XAMPP application manager.

The XAMPP application manager.

Next, select the Manage Servers tab next to the Welcome tab at the top:

XAMPP’s "Manage Servers" settings.

XAMPP’s “Manage Servers” settings.

On this screen, you’ll find a list of options. You can click on Apache Web Server, followed by the Configure button.

Step 2: Open the Conf File

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

XAMPP’s "Configure Apache Web Server" options.

XAMPP’s “Configure Apache Web Server” options.

A warning box will appear, stating that the file is for advanced users:

XAMPP’s conf file warning “for advanced users”.

XAMPP’s conf file warning “for advanced users”.

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

Step 3: Update the Port Settings

Once the file opens in your text editor, the next step is to update the port settings. To do so, you can hit Ctrl + F, and then enter “80” in the search field. This will display instances of the number 80:

XAMPP’s httpd.conf file port settings.

XAMPP’s httpd.conf file port settings.

Locate the 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

When you’re done, you can save and close the file. In the Configure Apache Web Server box, click on OK.

Step 4: Restart Apache

The final step is to stop and restart Apache, which you can do from the XAMPP Application Manager’s Manage Servers tab. Once Apache is stopped, click on Start to restart:

The XAMPP Apache port.

The XAMPP Apache port.

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

Summary

The XAMPP error “Apache shutdown unexpectedly” is commonly caused by another program, such as Skype, using the default Apache port. While this can be frustrating, it usually has a simple resolution.

As we discussed in this article, the easiest way to fix this problem is to update XAMPP’s Apache configuration settings. You can do this by editing the httpd.conf file and the http-ssl.conf file (for Windows users). Once this is done, you should stop and restart Apache to resume normal operation.

Xampp Error

Are you getting the error “Apache shutdown unexpectedly”? Well, this article will help you sort this problem and carry on with your work.

PM 04:22:16  [Apache] Attempting to start Apache app…
PM 04:22:18  [Apache] Status change detected: running
PM 04:22:20  [Apache] Status change detected: stopped
PM 04:22:20  [Apache] Error: Apache shutdown unexpectedly.
PM 04:22:20  [Apache] This may be due to a blocked port, missing dependencies,
PM 04:22:20  [Apache] improper privileges, a crash, or a shutdown by another method.
PM 04:22:20  [Apache] Press the Logs button to view error logs and check
PM 04:22:20  [Apache] the Windows Event Viewer for more clues
PM 04:22:20  [Apache] If you need more help, copy and post this
PM 04:22:20  [Apache] entire log window on the forums

First, check which process is running in your port 80. try the following command in your terminal

net stop http

The above command will stop the process which is using your port 80.

If you are not interested in stopping that process and you want it to be running. Then you have to change the port for apache server. Below are the steps to change the port of apache

STEP #1: 
Open the XAMPP Control Panel as administrator.

STEP #2:
In the XAMPP Control Panel, Left click on the Config button corresponding to Apache

STEP #3:
Select ‘Apache (httpd.conf)’ from the drop-down menu. Notepad will open.

STEP #4:
Find Listen 80 and convert it to Listen 81.(or some other port number as per your wish) 

NOTE: When you try to run xampp you should use “localhost:81/dashboard/” instead of “localhost/dashboard/” 

STEP #5:
Find ServerName localhost:80 to ServerName localhost:81

STEP #6:
Save the notepad. Be sure that you can save the notepad file only if you open the XAMPP control panel as an Administrator. Now, start the Apache. It will run now.
If you have any problem regarding this, mention it in comments. I will try to solve your problem.

Update:

If you are using Skype, do the following steps:

Open Skype
Tools -> Options -> Advanced -> Connection
Uncheck the “Use port 80 and 443 for alternatives for incoming connections” checkbox
Sign Out and Close all Skype windows
Restart your Apache

fix apache shutdown unfortunately in Xampp

I tried to use the XAMPP server for my college projects, when I tried to start Apache from the XAMPP control panel in my Windows 10, I started getting “Apache shutdown unexpectedly” error message. Tried to fix it from several methods, unfortunately, failed. At last, I got one solution to fix this issue. This simple fix will surely help you to fix Apache shutdown unexpectedly easily. Error: Apache shutdown unexpectedly is mostly caused due to blocked port in XAMPP server. So in this post, we are going to explain how to fix Apache shutdown unexpectedly error easily.

If you are getting the below error when you click on the start button of the Apache in XAMPP, then this article will surely help you to come out with this problem. So try the mentioned method to fix it.

[Apache] Status change detected: running

[Apache] Status change detected: stopped

[Apache] Error: Apache shutdown unexpectedly.

[Apache] This may be due to a blocked port, missing dependencies,

[Apache] improper privileges, a crash, or a shutdown by another method.

[Apache] Press the Logs button to view error logs and check

[Apache] the Windows Event Viewer for more clues

[Apache] If you need more help, copy and post this

[Apache] entire log window on the forums

How to Fix Apache Shutdown Unexpectedly in XAMPP?

  1. Open XAMPP control panel and click on “Config” of the Apache How to fix xampp apache error shutdown unexpectedly
  2. Now select the “httpd:conf” fix apache error shutdown unexpectedly
  3. You have to edit some texts here, firstly search for “Listen 80” using CTRL + F fix xampp apache not starting in windows
  4. Now change it to Listen 8080
  5. Now look for “ServerName localhost:80”
  6. Change it to “ServerName localhost:8080” Solve apache not working xampp
  7. Now save edited texts using CTRL + S or click on File -> Save
  8. After saving it, close the notepad
  9. Now click on “Config” again and select “http-ssl.conf” Apache not starting in Xampp
  10. Find for “Listen 443” and change it to “Listen 4433
  11. Then again find “VirtualHost_default_:443” and change it to “VirtualHost_default_:4433” apache port xampp
  12. At last, save it and close the windows
  13. Again go to XAMPP control panel and click on main “Config” how to fix xampp apache not working
  14. Select Service and Port settings
  15. Now you have to change port 80 to 8080 and 443 to 4433 and save fix blocked port in xampp
  16. You are done. Restart the XAMPP control center
  17. Now start the Apache to check localhost working or not!
  • Also Read:-  How to Fix ‘Please install Skype from the Windows Store for the best experience’ Error?

How to Fix Xampp Apache Not Starting in Windows 10?

  • Press Windows + R and type services.msc and hit enter
  • Scroll down and search for World Wide Web Publishing Service
  • Right-click on World Wide Web Publishing Service
  • Now select Startup type and disable
  • Also Read: – 8 Easy Ways To Speed Up Your Windows

Fix a Blocked Port in XAMPP

You can also fix the error: Apache shutdown unexpectedly messages by closing the applications which use the port 80. Some apps which use port 80 are Skype, IIS, etc. To close them to allow port 80 for your XAMPP by following the below method.

Fix Skype XAMPP Port Problem

  • Open Skype and go to tools
  • Click on options -> Advance -> Connection
  • Now untick the checkbox “use port 80 and 443 for additional incoming connections
  • That’s it. You are done!

Bottom Line

So, guys, these are the best and working methods available to fix Apache shutdown unexpectedly error in XAMPP. I hope this method helps you to fix the Apache shutdown unexpectedly error in XAMPP. This method will 100% work to fix XAMPP localhost problem in your Windows. Do share this post with your friend who is also facing the same problem and keep visiting us.

Freelancer and writer who keeps a close eye on new technologies. He writes about the best apps/games, how-to tips, tutorials especially on Android, iPhone, computers, Windows, Linux, and Mac.

Понравилась статья? Поделить с друзьями:
  • Как найти распределение падения напряжения
  • Как можно исправить ошибку в электронном билете
  • Как найти площадь десятичных дробей
  • Как найти клад в рафт
  • Как найти хорошего поставщика на садоводе отзывы