После установки панели управления XAMPP в Windows 10 многие пользователи сообщали об ошибке при запуске Apache . Эта проблема обычно возникает, когда такой процесс, как World Wide Publishing Service, продолжает работать на 80-м порту вашего устройства. Из-за этого операционная система Windows 10 не позволяет серверу Apache работать, и это вызывает ошибку.
5:38:38 PM [Apache] Error: Apache shutdown unexpectedly. 5:38:38 PM [Apache] This may be due to a blocked port, missing dependencies, 5:38:38 PM [Apache] improper privileges, a crash, or a shutdown by another method. 5:38:38 PM [Apache] Press the Logs button to view error logs and check 5:38:38 PM [Apache] the Windows Event Viewer for more clues 5:38:38 PM [Apache] If you need more help, copy and post this 5:38:38 PM [Apache] entire log window on the forums
Фактически, порт 80 на компьютере также был портом TCP / IP по умолчанию, который модуль Apache использует на XAMPP. А поскольку два разных приложения не могут использовать один и тот же сетевой порт, вам необходимо остановить его перед запуском сервера Apache XAMPP. Если вы также столкнулись с этой проблемой на своем устройстве, есть несколько простых способов, которые я упомянул в этом руководстве. Итак, начнем.
Очистка службы публикации в World Wide Web была бы лучшим подходом, чтобы снова запустить Apache. Однако вы также можете получить его, изменив номер порта TCP / IP или остановив службу, если это необходимо. Итак, чтобы исправить запуск Apache на панели управления XAMPP, выполните следующие возможные действия:
- Clear World Wide Web Services
- Изменить порт Apache TCP/IP по умолчанию
- Остановите World Wide Web Publishing Service
Давайте посмотрим на них подробно.
1] Clear World Wide Web Services
Чтобы решить начальную проблему службы Apache, вам необходимо очистить всемирную паутину от вашего устройства. Но прежде чем начать, убедитесь, что у вас нет приложений, использующих этот сервис.
Если все в порядке, откройте панель управления в вашей системе Windows.
После того, как он откроется, выберите для просмотра панели управления параметр «Большие значки» или «Маленькие значки», чтобы можно было видеть все элементы панели управления.
Из доступных элементов выберите Программы и компоненты.
В левой боковой панели есть ссылка «Включение или отключение функций Windows», нажмите на нее.
В диалоговом окне «Функции Windows» разверните Информационные службы Интернета.
Теперь снимите флажок «World Wide Web Services» и нажмите кнопку «ОК», чтобы сохранить изменения.
Выполнив вышеуказанные действия, перезагрузите устройство. После этого откройте панель управления XAMPP и нажмите кнопку «Пуск» в Apache. Теперь он должен работать в порту 80 на вашем компьютере.
2] Изменить порт Apache TCP/IP по умолчанию
Если по какой-либо причине вышеуказанный обходной путь не работает для вас, вам необходимо настроить Apache для выполнения на другом порту TCP/IP. Итак, следуйте этим советам:
Откройте панель управления XAMPP на вашем устройстве Windows.
Нажмите на кнопку Config модуля Apache.
Выберите пункт Apache (httpd.conf) в списке всплывающего меню.
На следующей странице блокнота вам нужно найти Listen 80.
Чтобы упростить поиск, нажмите сочетание клавиш Ctrl + F. Во всплывающем меню введите то, что вы хотите найти. Марк Wrap вокруг флажка, оставить дело Match бесконтрольно, а затем нажмите на Find Next кнопку.
Как только вы найдете соответствующую строку, измените номер порта на любой произвольный номер по вашему выбору.
Например, вы можете попробовать порт 121. Тогда соответствующий результат для номера порта TCP/IP будет что-то вроде — Listen 121.
Нажмите сочетание клавиш Ctrl + S, чтобы сохранить изменения в блокноте.
Примечание. Обратите внимание, что при использовании этой конфигурации вам всегда нужно добавить номер порта TCP/IP в URL, который вы хотите подключить к своему сайту. Например, чтобы получить доступ к серверу Apache в вашем браузере, вам нужно будет ввести: localhost:121/dashboard
, а не localhost/dashboard
.
После правильного выполнения вышеуказанных шагов, проблема запуска Apache в XAMPP будет исправлена.
3] Остановите издательский сервис World Wide Web
В качестве альтернативы вам необходимо остановить службу публикации в Интернете и изменить ее параметры, чтобы она могла быть запущена только вручную. Итак, начнем:
Чтобы остановить службу публикации в Интернете, сначала необходимо открыть диспетчер служб Windows на компьютере с Windows 10.
На экране «Службы» найдите параметр «Служба публикации в Интернете» в столбце «Имя».
Как только вы найдете, дважды щелкните по нему, чтобы открыть окно свойств.
В окне свойств по умолчанию открывается вкладка Общие.
На вкладке General найдите тип запуска и переключите его на Manual. Это позволит вам запустить службу вручную, когда это потребуется.
Продвигаясь вперед, остановите статус работающей службы и нажмите Apply > кнопку OK.
Теперь откройте панель управления XAMPP и нажмите кнопку «Пуск», чтобы запустить сервер Apache.
Вот и все. Я надеюсь, что это руководство поможет вам исправить проблему запуска службы Apache на панели управления XAMPP.
While trying to start Apache using XAMPP, I was receiving — «Attempting to start Apache service…» message in XAMPP UI. No further details were available.
Where can I see the logs (I was running XAMPP as Admin) ?
asked Mar 16, 2015 at 4:56
1
IF PORT 80 IS NOT THE ISSUE!
Check to see if the port 80 is in use first as this can be an issue.
You can do this by typing «netstat -an» into cmd. The look for 0.0.0.0:80 under Local Address, if you find this is in use then follow the solution from @Karthik. However, I had a similar issue but my port 80 was not in use.
My XAMPP had wrong paths locations, steps to fix this:
1.Find out the Apache version you are using, you can find this by looking in Services (Control panel, Admin Tools, Services) and finding Apache in my case it was listed as Apache2.4
2.Close XAMPP.
3.Run cmd as admin.
4.execute ‘sc delete «Apache2.4″‘ (put your version in place of mine and without the surrounding ‘ ‘, but with the » » around Apache).
5.execute ‘sc delete «mySQL»‘, again remove the » when you type it.
6.reopen XAMPP and try starting Apache
If you are having trouble with FileZill, Mercury, or Tomcat you could try it here too, but I have not tested that myself.
Hope this helps!
answered Jun 15, 2016 at 14:25
AlexAlex
1,0241 gold badge11 silver badges16 bronze badges
1
I realized it was a port issue since I was running IIS and other web servers in my machine. But I was more interested to see a detailed error message with the port number in the UI.
Seems like it was not logged in the UI or log file (at least in my case), but in the Event viewer (Control panel -> View Event Logs). Under the Even viewer -> Windows Logs -> Application
I could see a permission error something like the below one:
An attempt was made to access a socket in a way forbidden by its access permissions. : AH00072: make_sock: could not bind to address 0.0.0.0:443
To fix this permission issue for SSL port, Please change the below line in httpd-ssl.conf (C:xamppapacheconfextra)
# When we also provide SSL we have to listen to the
standard HTTP port (see above) and to the HTTPS port
Listen xxx
Replace XXX with any valid port number that is open in your machine
If you are having issues with Port 80, then change the httpd.conf file (C:xamppapacheconf)
# 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 127.0.0.1:8000
I have also summarized other solutions that I came across:
- Most often Skype blocks the Apache port. So terminate it and try again.
- Find the process id (PID) that is using the Blocked port ( netstat -ano) and kill the corresponding process in Windows Task Manager.
answered Mar 16, 2015 at 4:56
KarthikKarthik
3,0653 gold badges31 silver badges61 bronze badges
3
For those who have accidentally (or not) changed one of the .conf files and apache does not run even after trying all the above solutions.
One easy way to track where the issue is located, is to run Apache via command prompt:
(On windows) : open command prompt as admin then navigate inside the bin folder of Apache , next run
httpd
in order to run apache
C:xamppapachebinhttpd
For my case it was :
someone had added a virtual host in the specific file that caused the problem . I commented the lines and Apache ran fine.
answered Jun 27, 2018 at 10:48
PrometheusPrometheus
9892 gold badges15 silver badges28 bronze badges
1
start xampp (as administrator),
(1) right click C:xamppxampp-control.exe, and run as administrator.
(2) unistall service module and then install service module.
(3) now try start the apache and mysql.
answered Dec 5, 2015 at 17:17
Check your DocumentRoot path (in httpd.conf
); a typo there can cause this problem.
Katriel
120k19 gold badges134 silver badges168 bronze badges
answered Mar 1, 2016 at 22:48
AlexAlex
312 bronze badges
0
Had the same issue while updating to PHP7.2
Problem:
First I closed skype and then checked whether port 80 is not an issue. How you can check that? See @AlexT comment above.
In my case, port 80 wasn’t an issue. So now I had to figure out what was wrong. So I checked Error Logs Control Panel > Even viewer > Windows Logs > Application and found following error against Apache2.4
httpd.exe: Syntax error on line 520 of C:/xampp/apache/conf/httpd.conf: Syntax error on line 18 of C:/xampp/apache/conf/extra/httpd-xampp.conf: Cannot load C:/xampp/php/php7ts.dll into server: The Apache service named is not a valid Win32 application.
Which means I had installed wrong PHP version. Actually I downloaded win64 version while the required version was Win32 for me.
So I downloaded correct version from: Download PHP 7.2.0 extracted it in C:/xampp/php folder, restarted the apache and it worked
answered Dec 5, 2017 at 10:59
JazzbotJazzbot
3851 gold badge4 silver badges18 bronze badges
1
I had the same issue, executing «setup_xampp.bat» in xampp folder solved my issue.
answered May 18, 2020 at 3:57
Hassan RazaHassan Raza
3661 gold badge5 silver badges14 bronze badges
1
I had the same problem but it was because I had a previous version of xampp already installed and I tried to install a newer version. I had installed the newer version in another file directory (I had named the file directory xampp2). I solved the problem by uninstalling the newer version, renaming the old one (I renamed it xamppold) and I installed xampp again.
I guess if you haven’t installed xampp in another file directory , it should be enough to reinstall xampp. If you are worried about your files , you always can make a backup before reinstalling xampp.
I solved the problem after watching the xampp activity log (the list of the bottom) and realizing xampp was trying to open the custom file path but I had another route path. If the first option didn’t work, at least you can scroll up in the activity log and see what’s error you get while starting as admin and trying to re install the Apache module or trying to start the module.
You may wander why I didn’t just simply uninstall the whole thing from the beginning , and the answer would be because I had to tweak a couple of things in xampp for some different projects (from changing the ports , to add .dll to run mongo.db in Apache), and I was just too lazy to re-do everything again :b
I hope my answer can be helpful for anyone since this is my first time writing in stackoverflow
Cheers
answered Jan 15, 2020 at 2:36
In my case, with the same problem and Xampp window, I had copied apacheconfextrahttpd-vhosts.conf entries from an old Xampp version to a newly installed one so I could continue to open local projects in browsers. One of the vhosts paths was wrong. After deleting that entry Apache started without problem.
The reference by @Karthik to «in the Event viewer (Control panel -> View Event Logs» saved me time. It’s all too easy to presume Xampp logs will point to the problem. It doesn’t.
answered May 2, 2020 at 11:22
Also check if your xampp is installed in the main directory like C or D or E and not in or within a folder of that directory? i.e. ( «D:/Xampp» or is it «D:/something/Xampp») if its not in the main path of the directory, it will show this error.
copy your xampp directory from «D:SomethingXampp» to «D:»
So it becomes like this «D:Xampp»
and the issue will be resolved.
answered Oct 27, 2020 at 13:38
CheckCheck
111 bronze badge
Starting Xampp as a console application (simply by doubleclicking xampp_start.exe in the Xampp root folder) was the only thing that worked for me on Windows 10 (no Skype, no Word Wide Web Publishing Service). WampServer and UwAmp also didn’t work.
answered Feb 3, 2017 at 16:34
I had a hard-coded IP in httpd.conf and my local IP had changed which was causing my issue, changed IP over and all worked again
answered Mar 5, 2018 at 5:51
My scenario was different after I tested all the possible options. If you have changed the ports and still get the same problem, well here’s something you can try out. This was done in Windows 7.
Step 1: Confirm the cause of the error by going to Control Panel -> System and Security -> Administrative Tools -> Event Viewer -> Windows Logs -> Application -> Error. Mine said «The Apache service named reported the following error:
httpd.exe: Syntax error on line 424 of C:/xampp/apache/conf/httpd.conf: Cannot load c:xamppphpphp5apache.dll into server: The specified module could not be found.» So I needed to change php5apache.dll to the version of my php and apache version installed which was php7apache2_4.dll
Step 2: To get the correct name for your .dll php and apache file, got to C:xamppphp. You will see something like php7apache2_4.dll with other files in the folder.
Step 3: Go to C:/xampp/apache/conf/httpd.conf and edit the configuration file and change «c:xamppphpphp5apache.dll» to «c:xamppphpphp7apache2_4.dll» in my case. Make sure you open the file as administrator save changes made.
Step 4: Run the xampp server and everything should work fine. Do not forget to shut down the xampp server before doing the changes to the apache configuration file.
Hope this helps. Cheers!
Anh Pham
2,0989 gold badges18 silver badges29 bronze badges
answered Mar 5, 2018 at 2:08
PerezPerez
11 bronze badge
Try to install x86 version of XAMPP. The default XAMPP version on their website is x64 (maybe because I’m using x64 Windows 7).
download link here
answered Mar 7, 2019 at 12:45
BawmBawm
791 silver badge3 bronze badges
I had this issue when I installed under Program Files, which they do not recommend due to write issues. This might only be a problem if you are not logged in as an admin and use a password to install. I just uninstalled and installed in a directory that did not need admin privileges.
answered Apr 5, 2019 at 18:01
dustydojodustydojo
4295 silver badges14 bronze badges
Make sure Apache didn’t get Disabled in Services (Control panel, Admin Tools, Services). If it’s Disabled then Set it to Manual and it should run. That was my case, I found Apache Disabled.
answered Jul 6, 2019 at 13:01
Solution for my particular scenario (It had been working a couple days before getting borked):
Port 80 was not the problem, but something I had done while messing around with Services and Startup.
- Type
msconfig
on Windows’ Start menu - Click System Configuration
Screenshot for System Configuration
- In the Services tab, search for Apache24 (Click «Hide all Microsoft services» in the checkbox at the bottom of the window to make it easier to find)
- If its checkbox isn’t checked, check it
If it was already checked, then this guide isn’t going to help. However if it is:
- Click OK, your PC will have to restart
- Try once again! In my case Apache was already running once I opened Xampp
answered Sep 18, 2019 at 22:40
I had the same issue.Just click on services button.Then find apache and right cick > properties > set startup type as Automatic/ Manual. Now close apache and try again.It will work!
Calos
1,77319 silver badges28 bronze badges
answered Mar 3, 2020 at 4:58
HassyHassy
11 bronze badge
For me it wasn’t a port or service issue; I had to re-run the XAMPP setup script. Although this didn’t directly fix the issue for me, the script was much more verbose than the XAMPP log, pointing me in the right direction to actually solve the problem.
From the XAMPP GUI, click on Shell, type set
, press Tab to autocomplete to the setup_xampp.bat
file, and then press Enter to run it.
In my case I got the following output:
[ERROR]: Test php.exe failed !!!
[ERROR]: Perhaps the Microsoft C++ 2008 runtime package is not installed.
[ERROR]: Please try to install the MS VC++ 2008 Redistributable Package from the Mircrosoft page first
[ERROR]: http://www.microsoft.com/en-us/download/details.aspx?id=5582
This particular error is misleading. Although it specifies the Visual C++ 2008 Redistributable Package, PHP 7.4.x requires the Visual C++ 2019 Redistributable Package.
After installing that and following the prompt to restart, sure enough I’m now able to start Apache as normal.
answered Sep 4, 2020 at 20:59
Hashim AzizHashim Aziz
3,8685 gold badges37 silver badges66 bronze badges
make sure no space in front of the port number if you ever edited it.
answered Apr 28, 2021 at 19:50
From Xampp control panel, click on config (next to Apache), then choose Apache(httpd.config
), search for listen 80
and change the port to another port.
answered Jun 27, 2021 at 16:55
ZeinabZeinab
3694 silver badges14 bronze badges
If nothing works with you, I would suggest you download MAMP and use it instead.
It does the same thing, if not better.
answered Aug 6, 2022 at 5:52
baraabaraa
91 silver badge3 bronze badges
Comment this lines from httpd.conf
:
# Virtual hosts
#Include etc/extra/httpd-vhosts.conf
In the case you’re using them it may solve.
answered Aug 27, 2022 at 20:32
testing_22testing_22
2,3101 gold badge12 silver badges28 bronze badges
when i run xampp control panel normal:
I had been run
I can’t start apache
So, I will run it with administrator:
I can run apache
coder
8,29615 gold badges39 silver badges53 bronze badges
answered Jun 1, 2018 at 2:41
I’m using XAMPP, and I can start Apache, but, MySQL (phpMyAdmin) start!
When I start, I get this error;
10:07:49 [Apache] Error: Apache shutdown unexpectedly.
10:07:49 [Apache] This may be due to a blocked port, missing dependencies,
10:07:49 [Apache] improper privileges, a crash, or a shutdown by another method.
10:07:49 [Apache] Press the Logs button to view error logs and check
10:07:49 [Apache] the Windows Event Viewer for more clues
10:07:49 [Apache] If you need more help, copy and post this
10:07:49 [Apache] entire log window on the forums
I search on it, and, change the port of Apache in Config -> Service and Port setting. I have;
Service name: Apache 2.4
Main port: 122
SSL port: 444
I also uninstall Skype (Windows 8/10/Metro version). Nothing is working. In the httpd.conf file I have;
Listen 122
ServerName localhost:122
I start it via apache_start.bat
and get;
(OS 10013)An attempt was made to access a socket in a way forbidden by its access permissions. : AH00072: make_sock: could not bind to address [::]:445
(OS 10013)An attempt was made to access a socket in a way forbidden by its access permissions. : AH00072: make_sock: could not bind to address 0.0.0.0:445
AH00451: no listening sockets available, shutting down
AH00015: Unable to open logs
Please note that all the log files don’t exists!
Skype is uninstalled.
In a previous article, we’ve explored the issue of Apache being unable to start on macOS devices. In this article, we will be exploring the same thing, but for the Windows version of XAMPP.
What should you do if XAMPP’s Apache service does not run on your Windows machine? Read on to find out.
Update 6 April 2023: Added some new solutions to the article.
- The problem
- Possible causes and fixes
- Changing the default XAMPP Apache port
- Disabling the World Wide Publishing Service (W3PS)
- Re-installing XAMPP
- Troubleshooting using XAMPP logs
- Getting output from
apache_start.bat
- Reading Apache logs
- Getting output from
- Conclusion
1. The problem
If Apache is unable to start on your XAMPP Control Panel, you will likely see the following error shown below:

When you try to start Apache Web Server, the XAMPP Control Panel will attempt to do so, but end up failing abruptly, mentioning that “Apache shutdown unexpectedly” (like the red text shown in the photo above).
Below is a transcription of the error, with the shutdown message highlighted.
[Apache] Attempting to start Apache app...
[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.
2. Possible causes and fixes
If XAMPP’s Apache cannot start, it is very likely that your default HTTP port (80), is blocked or being used by another application. To fix that, you can explore the solutions below.
a. Changing the default XAMPP Apache port
To determine if port 80 being blocked is your actual problem, you can change the default port number for Apache and see if it fixes your issue.
To change XAMPP Apache’s port number, refer to the steps below:
- Click on the Config button next to the Apache Web server (refer to the image below), and select
httpd.conf
. - In the file, search for
Listen 80
and change it toListen 8080
. - Once done, try starting Apache on XAMPP again. If the problem was due to a blocked port, Apache should now start with no problem.

Article continues after the advertisement:
Note that if you are using any other port than 80 or 443, you will have to append the port number at the end of the URL to access the page(s) on XAMPP. For example, if Apache listens to port 8080, the URL you will have to access will be localhost:8080
instead of the default localhost
.
Note that for pre-existing virtual hosts on your XAMPP Apache, you will also need to update them to listen to port 8080 instead of 80.
If XAMPP still fails to start after changing your port, that means that the problem is not caused by a blocked port. In this case, you will want to undo the changes made to httpd.conf
, so that Apache is back to using Port 80.
b. Disabling the World Wide Web Publishing Service (W3PS)
If you are running a Windows server machine, you may have a process running called the World Wide Web Publishing Service (W3PS). The W3PS is a component of Windows’ Internet Information Services (IIS) — which is responsible for providing HTTP and HTTPS services on Windows machines — may be using port 80, thereby not allowing XAMPP Apache to connect to the same port.
Below, you can read instructions on how to either deactivate or stop the W3PS service, so that port 80 can be freed up for Apache’s use.
To deactivate the W3PS service (so that it doesn’t automatically start on your Windows device):
- Open the Control Panel.
- Select View by > Large Icons, so that all the icons in the Control Panel appear. Then, select Programs and Features.
- In the Programs and Features window, click on Turn Windows features on or off.
- In the newly-opened window, expand the Internet Information Service field, and uncheck the World Wide Web Services checkbox (see the image below).
- Once done, reboot your device, then try to start XAMPP Apache again. It should be able to run on port 80 now.


To stop the W3PS service (for this current boot) on your Windows device:
- Open the Windows Service Manager by pressing Windows ⊞ + R keys, and in the popped window, type in
services.msc
and press Enter. - Search for the World Wide Publishing Service option under the Name column and open its properties by double-clicking on it.

- In the General tab, click Startup Type and switch it to manual. Now, you are able to turn on/off W3PS manually.
- Stop the service and click OK.
- Try to start the XAMPP Apache web server again.
c. Re-installing XAMPP
If neither of the 2 fixes above worked for you, then there is likely a misconfiguration in your XAMPP installation or Apache config files. In such a case, you have 2 options:
- Read the log files to find out what happened, or;
- Re-install XAMPP (here’s the official source)
In most cases, re-installation will be the easier option. If you can uninstall it through the Add or remove programs interface, that would be best. Otherwise, if you can’t find XAMPP on Add or remove programs, you will have to find the folder where XAMPP is and manually remove the folder (it is usually found in C:xampp
). Always uninstall through Add or remove programs (or the Control Panel) if you have the option.
If you can’t find where XAMPP is installed on your computer, you can also do a search for xampp-control.exe
on your File Explorer. The folder that contains xampp-control.exe
is where XAMPP was installed.
3. Troubleshooting using XAMPP logs
If you still have trouble starting Apache after trying the solutions above, then your issue is very specific to your machine. In such a case, you will have to consult Apache’s or XAMPP’s log files to pinpoint what the error is.
a. Getting output from apache_start.bat
Funnily enough, the XAMPP Control Panel doesn’t actually output the messages that Apache outputs. Hence, if Apache doesn’t start, you can actually try running the apache_start.bat
file in your XAMPP install folder (for most of you, it should be in C:xamppapache_start.bat
). This will try to start XAMPP’s Apache using the Command Prompt, and output messages that you might otherwise not see in the Control Panel.
b. Reading Apache logs
You can also read Apache’s logs (error.log
is probably the most useful one) to see if it provides you with any insight. The logs can be accessed from XAMPP Control Panel, using the Log button beside the line for the Apache module.
These logs will not be as helpful as the output from apache_start.bat
however, as these logs are usually filled up when Apache is running; but our problem here is that it can’t even start.
4. Conclusion
Having read the article and applied the described solutions, we hope you could manage to fix your problems. Of course, there can be many more problems that cause this, and many with different solutions for these problems. If you are facing one of them that is not described in the article, please leave us a comment so that we can add this to the article (and credit you). Hence, your comment will help us make this article more and more helpful to everyone.
Article continues after the advertisement:
После установки панели управления XAMPP в Windows 10 многие пользователи сообщали об ошибке при запуске Apache . Эта проблема обычно возникает, когда такой процесс, как World Wide Publishing Service, продолжает работать на 80-м порту вашего устройства. Из-за этого операционная система Windows 10 не позволяет серверу Apache работать, и это вызывает ошибку.
5:38:38 PM [Apache] Error: Apache shutdown unexpectedly. 5:38:38 PM [Apache] This may be due to a blocked port, missing dependencies, 5:38:38 PM [Apache] improper privileges, a crash, or a shutdown by another method. 5:38:38 PM [Apache] Press the Logs button to view error logs and check 5:38:38 PM [Apache] the Windows Event Viewer for more clues 5:38:38 PM [Apache] If you need more help, copy and post this 5:38:38 PM [Apache] entire log window on the forums
Фактически, порт 80 на компьютере также был портом TCP / IP по умолчанию, который модуль Apache использует на XAMPP. А поскольку два разных приложения не могут использовать один и тот же сетевой порт, вам необходимо остановить его перед запуском сервера Apache XAMPP. Если вы также столкнулись с этой проблемой на своем устройстве, есть несколько простых способов, которые я упомянул в этом руководстве. Итак, начнем.
Очистка службы публикации в World Wide Web была бы лучшим подходом, чтобы снова запустить Apache. Однако вы также можете получить его, изменив номер порта TCP / IP или остановив службу, если это необходимо. Итак, чтобы исправить запуск Apache на панели управления XAMPP, выполните следующие возможные действия:
- Clear World Wide Web Services
- Изменить порт Apache TCP/IP по умолчанию
- Остановите World Wide Web Publishing Service
Давайте посмотрим на них подробно.
1] Clear World Wide Web Services
Чтобы решить начальную проблему службы Apache, вам необходимо очистить всемирную паутину от вашего устройства. Но прежде чем начать, убедитесь, что у вас нет приложений, использующих этот сервис.
Если все в порядке, откройте панель управления в вашей системе Windows.
После того, как он откроется, выберите для просмотра панели управления параметр «Большие значки» или «Маленькие значки», чтобы можно было видеть все элементы панели управления.
Из доступных элементов выберите Программы и компоненты.
В левой боковой панели есть ссылка «Включение или отключение функций Windows», нажмите на нее.
В диалоговом окне «Функции Windows» разверните Информационные службы Интернета.
Теперь снимите флажок «World Wide Web Services» и нажмите кнопку «ОК», чтобы сохранить изменения.
Выполнив вышеуказанные действия, перезагрузите устройство. После этого откройте панель управления XAMPP и нажмите кнопку «Пуск» в Apache. Теперь он должен работать в порту 80 на вашем компьютере.
2] Изменить порт Apache TCP/IP по умолчанию
Если по какой-либо причине вышеуказанный обходной путь не работает для вас, вам необходимо настроить Apache для выполнения на другом порту TCP/IP. Итак, следуйте этим советам:
Откройте панель управления XAMPP на вашем устройстве Windows.
Нажмите на кнопку Config модуля Apache.
Выберите пункт Apache (httpd.conf) в списке всплывающего меню.
На следующей странице блокнота вам нужно найти Listen 80.
Чтобы упростить поиск, нажмите сочетание клавиш Ctrl + F. Во всплывающем меню введите то, что вы хотите найти. Марк Wrap вокруг флажка, оставить дело Match бесконтрольно, а затем нажмите на Find Next кнопку.
Как только вы найдете соответствующую строку, измените номер порта на любой произвольный номер по вашему выбору.
Например, вы можете попробовать порт 121. Тогда соответствующий результат для номера порта TCP/IP будет что-то вроде — Listen 121.
Нажмите сочетание клавиш Ctrl + S, чтобы сохранить изменения в блокноте.
Примечание. Обратите внимание, что при использовании этой конфигурации вам всегда нужно добавить номер порта TCP/IP в URL, который вы хотите подключить к своему сайту. Например, чтобы получить доступ к серверу Apache в вашем браузере, вам нужно будет ввести: localhost:121/dashboard
, а не localhost/dashboard
.
После правильного выполнения вышеуказанных шагов, проблема запуска Apache в XAMPP будет исправлена.
3] Остановите издательский сервис World Wide Web
В качестве альтернативы вам необходимо остановить службу публикации в Интернете и изменить ее параметры, чтобы она могла быть запущена только вручную. Итак, начнем:
Чтобы остановить службу публикации в Интернете, сначала необходимо открыть диспетчер служб Windows на компьютере с Windows 10.
На экране «Службы» найдите параметр «Служба публикации в Интернете» в столбце «Имя».
Как только вы найдете, дважды щелкните по нему, чтобы открыть окно свойств.
В окне свойств по умолчанию открывается вкладка Общие.
На вкладке General найдите тип запуска и переключите его на Manual. Это позволит вам запустить службу вручную, когда это потребуется.
Продвигаясь вперед, остановите статус работающей службы и нажмите Apply > кнопку OK.
Теперь откройте панель управления XAMPP и нажмите кнопку «Пуск», чтобы запустить сервер Apache.
Вот и все. Я надеюсь, что это руководство поможет вам исправить проблему запуска службы Apache на панели управления XAMPP.
There are many possible answers for this problem. The most common and most likely is that you’re running another program which is blocking port 80 or 443. If you’ve installed Skype, then you’ve found your problem! Change apache’s port settings to 81 and apache will work. There’s a good tutorial on that To check this you can open up your command line by clicking the start menu, and typing ‘cmd’, and enter the command
netstat -nab
this wil return a list of programs that will vaguely resemble this pattern
[someprogram.exe]
UDP [fe80::numbers:numbers:numbers:numbers%numbers]:portnumber
You need to find a line (or lines) ending in :80 and terminate them in order to start apache. If there is no line ending in :80, there are more things you can do.
First, navigate to xampp’s directory (default is c:xampp) and double click apache_start.bat. This will open up a comand line and return more detailed errors about why apache can’t run. Mostly, be looking for syntax errors that you could’ve created by editing your httpd.conf, or httpd-ssl.conf files. This is very easy to do if you’ve edited it and are a new user.
If still this fails, your last hope is to check the apache error log by clicking on the logs tab in apache’s row in the xampp control panel and clicking error log.
If none of this works, don’t give up! You got this!
Edit: If you change the port of apache, you will also have to go into httpd.conf (located in xampp/apache/conf) and near line 184, replace
ServerName localhost:80
with
ServerName localhost:81
It is also possible to specify port 81 in the url of your localhost, i.e.
localhost:81/my_project.php
XAMPP is a useful platform for WordPress developers who are looking for a localhost solution. However, some issues can show up when you’re using this tool. These errors could stall your workflow and leave you unsure how to get XAMPP running again, especially because everything may appear to be in order on the surface.
Fortunately, once you identify the reason XAMPP is not starting for you, it often takes just a few tweaks to fix it. You can then get right back to work on your latest development project.
In this article, we’ll provide a brief overview of what XAMPP is for those who are new to the platform. Then we’ll show you how to check your error logs and resolve three common problems that may keep your local server from starting. Let’s dive in!
A Brief Introduction to XAMPP
XAMPP is a free local development tool. It essentially functions as a server on your computer that you can use to host websites — much like DevKinsta, our own free local development app.
Note that these sites are not publicly available to users on the open Internet. Rather, they’re meant to be used locally for development and testing purposes. If you wish, you can migrate each project to a live server once it’s finished.
XAMPP is a handy solution because it prevents visitors from finding your project while it’s still in progress. Plus, since the site is hosted on your computer, its performance should top-notch and you can work offline.
You can use XAMPP on any major Operating System (OS), including Windows, macOS, and Ubuntu Linux. It uses the open source Apache server and MySQL, and comes with several built-in tools such as phpMyAdmin and FileZilla.
When it comes to WordPress in particular, XAMPP is one of the top localhost solutions because it meets all of the Content Management System’s (CMS’s) requirements. These include:
- PHP 7.4
- MySQL 5.6
- HTTPS support
- Apache or NGINX server
If you’re interested in installing XAMPP, you can check out our tutorial on installing WordPress locally, which includes directions for this task.
How to Check Your XAMPP PHP Error Log
In the event that you’re developing a WordPress site locally using XAMPP, and you can’t get the platform to start up, your first step should be to check your error logs. This may point you in the direction of the problem’s cause.
If you know why the issue is occurring, you should be able to resolve it much faster than troubleshooting it by trial and error. Logs are accessed using different paths, depending on your OS and version. Fortunately, there’s a simple way to find the path for your setup.
On Windows, the XAMPP activity log appears in the lower half of the control panel dialog box. You can also access the error log by by clicking on the Logs button next to the Apache Config button:
On macOS, click on the Log tab in the control panel to see the activity log:
You can then take a look through your logs to see if there’s anything suspicious and follow any directives provided to resolve the issue(s).
In some cases it may be beneficial to have access to your PHP log as well, although this is usually more helpful for troubleshooting WordPress errors than those for Apache or MySQL.
To locate your PHP error logs, open the XAMPP dashboard by typing http://localhost into your browser’s address bar. There, click PHPInfo at the top of the screen:
Then search for “error_log”. This will reveal the path you need to enter in your address bar to view the log:
You should be able to simply type this path into your browser after http://localhost to view the PHP log.
Accessing Your XAMPP-VM for Mac PHP Logs
There are actually two versions of XAMPP for Mac users – “XAMPP for macOS” and “XAMPP-VM“. The latter enables you to run XAMPP for Linux on your Mac, using a virtual machine.
It’s important to know which version you’re using because it determines how you access key files we’ll be referencing throughout this post. For instance, if you’re using XAMPP for OS X, you can simply open Finder, go to Applications > XAMPP, and look for the logs folder to find your PHP log.
However, if you’re using XAMPP-VM, you first need to open the XAMPP control panel, click on the Volumes tab, and select Mount:
Then, when you launch Finder, click on your IP address in the left-hand menu and open the lampp folder. This is where you’ll find all your XAMPP files, including your PHP error logs.
How to Fix XAMPP If It’s Not Working (3 Common Solutions)
If your error logs are not forthcoming about the cause of the problem, you can try these solutions to get XAMPP working again. These tips also elaborate on some of the instructions your error log may be showing.
1. Resolve Apache Port Conflicts
If Apache cannot start, you won’t be able to access your XAMPP dashboard or any sites you have installed on the platform. A port conflict may be the underlying problem.
By default, Apache connects over port 80. If you see an error message that says this port is already in use, another application is blocking the connection (Skype is a frequent offender).
If you click on the Netstat button in the XAMPP control panel, it should show you all the ports that are currently in use, and which applications are using them. You may want to check this if XAMPP Apache is not starting:
If you know which program is the problem and can unblock the port by removing the application that’s in the way, this will solve the issue immediately. However, you can also change the Apache listening port for XAMPP, so that you connect while leaving your other platforms intact.
First, you’ll need to find your httpd.conf file. This process is slightly different depending on your OS and which version of XAMPP you’re using.
Changing Your XAMPP Apache Port on Windows
On Windows, open the XAMPP control panel and click on the Config button:
Then select httpd.conf. Search in this file for the line that reads “Listen 80”, and change it to “Listen 8080”. This will enable you to connect to Apache over port 8080 instead of the default option.
You’ll also need to look for the line that reads ServerName localhost:80
, and change this to ServerName localhost:8080
. Save and close the file.
Then try starting Apache again. If this was your only problem, the platform should run as intended. However, note that if you have a WordPress installation hosted via XAMPP, you’ll need to find and replace all mentions of “localhost” with “localhost:8080”, including those in your database.
Changing Your XAMPP Apache Port on Mac
If you’re running XAMPP for macOS, you can find your httpd.conf file by going to Applications > XAMPP in Finder. Once you find the file, you can carry out the same steps to change your port as we described for Windows users.
For those using XAMPP-VM, scroll back up to the section where we explained how to access your error logs to learn how to find your XAMPP files. Once you access the lampp directory, you’ll find httpd.conf in apache2 > conf.
2. Include the Listening Port in the Address When Accessing Localhost
Normally, you can simply type http://localhost into your browser’s address bar to access your XAMPP-hosted sites or dashboard. The platform automatically connects to Apache over its default listening port, 80.
However, if you’ve changed your XAMPP installation’s listening port (or someone else with access to your computer did so), it won’t be able to connect. You may also see this occur if there’s an Apache port conflict, as described above.
This problem can be quite confusing because the XAMPP control panel may show that Apache and MySQL are both running. However, you won’t be able to access your site or tools such as PHPInfo or phpMyAdmin.
This error can take a few different forms. If you’re trying to access your local WordPress site, you may see a 404 error page. Chrome users may see ERR_CONNECTION_REFUSED instead:
Fortunately, the solution is fairly simple. You simply need to append the listening port to the address. For example, if you’re using the most common alternative port, you would enter http://localhost:8080 instead of just http://localhost.
However, if you would like to be able to simply enter localhost even though you have changed your Apache listening port, you can do so.
Changing the Default Port on Windows
Windows users change the XAMPP Apache default port to their new listening port so that you don’t have to specify it in the address bar. To do so, click on Config > Service and Port Settings > Apache in the XAMPP control panel:
Then replace the Main Port value with the new Apache port you configured and save your changes.
Set Up Port Forwarding on macOS
On macOS the process is quite different. In your control panel, click on the Network tab. Here you can set up port forwarding rules:
You’ll want to add a new rule that redirects traffic to the default port to your new Apache listening port. If you click on Add, you’ll be able to enter these values in the relevant fields:
Select the rule from the list and click on the Enable button to start using it.
3. Change Your MySQL Port
Finally, sometimes XAMPP is not working due to an issue with MySQL, rather than Apache. However, the problem is still often a port conflict, which means that by now you should have a good idea on how to fix it.
In this case, you’ll need to access your php.ini file instead of your configuration file. Navigating to your XAMPP dashboard and clicking on PHPInfo as we described earlier in this post will enable you to find the path to this file for your installation:
Alternatively, if you’re using XAMPP for Windows, you can access this file from the control panel by click on Config > PHP (php.ini):
Once you find and open php.ini, look for the lines that read port = 3306
, and change them to read port = 3307
. Save and close the file, and then restart MySQL.
Summary
XAMPP is a helpful tool to have in your corner, but it can be frustrating to troubleshoot certain errors that prevent you from accessing your local WordPress site. Fortunately, these are often port conflicts that you can quickly implement workarounds for.
In this article, we showed you what to do if XAMPP isn’t working due to a problem with Apache or MySQL:
- Resolve Apache port conflicts by changing your listening port to 8080.
- Include the listening port in the address when accessing localhost.
- Change your MySQL port to 3307 if another application is blocking the default port 3306.
Don’t forget to check out DevKinsta as an alternative to XAMPP.
Get all your applications, databases and WordPress sites online and under one roof. Our feature-packed, high-performance cloud platform includes:
- Easy setup and management in the MyKinsta dashboard
- 24/7 expert support
- The best Google Cloud Platform hardware and network, powered by Kubernetes for maximum scalability
- An enterprise-level Cloudflare integration for speed and security
- Global audience reach with up to 35 data centers and 275+ PoPs worldwide
Test it yourself with $20 off your first month of Application Hosting or Database Hosting. Explore our plans or talk to sales to find your best fit.
XAMPP is a useful platform for WordPress developers who are looking for a localhost solution. However, some issues can show up when you’re using this tool. These errors could stall your workflow and leave you unsure how to get XAMPP running again, especially because everything may appear to be in order on the surface.
Fortunately, once you identify the reason XAMPP is not starting for you, it often takes just a few tweaks to fix it. You can then get right back to work on your latest development project.
In this article, we’ll provide a brief overview of what XAMPP is for those who are new to the platform. Then we’ll show you how to check your error logs and resolve three common problems that may keep your local server from starting. Let’s dive in!
A Brief Introduction to XAMPP
XAMPP is a free local development tool. It essentially functions as a server on your computer that you can use to host websites — much like DevKinsta, our own free local development app.
Note that these sites are not publicly available to users on the open Internet. Rather, they’re meant to be used locally for development and testing purposes. If you wish, you can migrate each project to a live server once it’s finished.
XAMPP is a handy solution because it prevents visitors from finding your project while it’s still in progress. Plus, since the site is hosted on your computer, its performance should top-notch and you can work offline.
You can use XAMPP on any major Operating System (OS), including Windows, macOS, and Ubuntu Linux. It uses the open source Apache server and MySQL, and comes with several built-in tools such as phpMyAdmin and FileZilla.
When it comes to WordPress in particular, XAMPP is one of the top localhost solutions because it meets all of the Content Management System’s (CMS’s) requirements. These include:
- PHP 7.4
- MySQL 5.6
- HTTPS support
- Apache or NGINX server
If you’re interested in installing XAMPP, you can check out our tutorial on installing WordPress locally, which includes directions for this task.
How to Check Your XAMPP PHP Error Log
In the event that you’re developing a WordPress site locally using XAMPP, and you can’t get the platform to start up, your first step should be to check your error logs. This may point you in the direction of the problem’s cause.
If you know why the issue is occurring, you should be able to resolve it much faster than troubleshooting it by trial and error. Logs are accessed using different paths, depending on your OS and version. Fortunately, there’s a simple way to find the path for your setup.
On Windows, the XAMPP activity log appears in the lower half of the control panel dialog box. You can also access the error log by by clicking on the Logs button next to the Apache Config button:
On macOS, click on the Log tab in the control panel to see the activity log:
You can then take a look through your logs to see if there’s anything suspicious and follow any directives provided to resolve the issue(s).
In some cases it may be beneficial to have access to your PHP log as well, although this is usually more helpful for troubleshooting WordPress errors than those for Apache or MySQL.
To locate your PHP error logs, open the XAMPP dashboard by typing http://localhost into your browser’s address bar. There, click PHPInfo at the top of the screen:
Then search for “error_log”. This will reveal the path you need to enter in your address bar to view the log:
You should be able to simply type this path into your browser after http://localhost to view the PHP log.
Accessing Your XAMPP-VM for Mac PHP Logs
There are actually two versions of XAMPP for Mac users – “XAMPP for macOS” and “XAMPP-VM“. The latter enables you to run XAMPP for Linux on your Mac, using a virtual machine.
It’s important to know which version you’re using because it determines how you access key files we’ll be referencing throughout this post. For instance, if you’re using XAMPP for OS X, you can simply open Finder, go to Applications > XAMPP, and look for the logs folder to find your PHP log.
However, if you’re using XAMPP-VM, you first need to open the XAMPP control panel, click on the Volumes tab, and select Mount:
Then, when you launch Finder, click on your IP address in the left-hand menu and open the lampp folder. This is where you’ll find all your XAMPP files, including your PHP error logs.
How to Fix XAMPP If It’s Not Working (3 Common Solutions)
If your error logs are not forthcoming about the cause of the problem, you can try these solutions to get XAMPP working again. These tips also elaborate on some of the instructions your error log may be showing.
1. Resolve Apache Port Conflicts
If Apache cannot start, you won’t be able to access your XAMPP dashboard or any sites you have installed on the platform. A port conflict may be the underlying problem.
By default, Apache connects over port 80. If you see an error message that says this port is already in use, another application is blocking the connection (Skype is a frequent offender).
If you click on the Netstat button in the XAMPP control panel, it should show you all the ports that are currently in use, and which applications are using them. You may want to check this if XAMPP Apache is not starting:
If you know which program is the problem and can unblock the port by removing the application that’s in the way, this will solve the issue immediately. However, you can also change the Apache listening port for XAMPP, so that you connect while leaving your other platforms intact.
First, you’ll need to find your httpd.conf file. This process is slightly different depending on your OS and which version of XAMPP you’re using.
Changing Your XAMPP Apache Port on Windows
On Windows, open the XAMPP control panel and click on the Config button:
Then select httpd.conf. Search in this file for the line that reads “Listen 80”, and change it to “Listen 8080”. This will enable you to connect to Apache over port 8080 instead of the default option.
You’ll also need to look for the line that reads ServerName localhost:80
, and change this to ServerName localhost:8080
. Save and close the file.
Then try starting Apache again. If this was your only problem, the platform should run as intended. However, note that if you have a WordPress installation hosted via XAMPP, you’ll need to find and replace all mentions of “localhost” with “localhost:8080”, including those in your database.
Changing Your XAMPP Apache Port on Mac
If you’re running XAMPP for macOS, you can find your httpd.conf file by going to Applications > XAMPP in Finder. Once you find the file, you can carry out the same steps to change your port as we described for Windows users.
For those using XAMPP-VM, scroll back up to the section where we explained how to access your error logs to learn how to find your XAMPP files. Once you access the lampp directory, you’ll find httpd.conf in apache2 > conf.
2. Include the Listening Port in the Address When Accessing Localhost
Normally, you can simply type http://localhost into your browser’s address bar to access your XAMPP-hosted sites or dashboard. The platform automatically connects to Apache over its default listening port, 80.
However, if you’ve changed your XAMPP installation’s listening port (or someone else with access to your computer did so), it won’t be able to connect. You may also see this occur if there’s an Apache port conflict, as described above.
This problem can be quite confusing because the XAMPP control panel may show that Apache and MySQL are both running. However, you won’t be able to access your site or tools such as PHPInfo or phpMyAdmin.
This error can take a few different forms. If you’re trying to access your local WordPress site, you may see a 404 error page. Chrome users may see ERR_CONNECTION_REFUSED instead:
Fortunately, the solution is fairly simple. You simply need to append the listening port to the address. For example, if you’re using the most common alternative port, you would enter http://localhost:8080 instead of just http://localhost.
However, if you would like to be able to simply enter localhost even though you have changed your Apache listening port, you can do so.
Changing the Default Port on Windows
Windows users change the XAMPP Apache default port to their new listening port so that you don’t have to specify it in the address bar. To do so, click on Config > Service and Port Settings > Apache in the XAMPP control panel:
Then replace the Main Port value with the new Apache port you configured and save your changes.
Set Up Port Forwarding on macOS
On macOS the process is quite different. In your control panel, click on the Network tab. Here you can set up port forwarding rules:
You’ll want to add a new rule that redirects traffic to the default port to your new Apache listening port. If you click on Add, you’ll be able to enter these values in the relevant fields:
Select the rule from the list and click on the Enable button to start using it.
3. Change Your MySQL Port
Finally, sometimes XAMPP is not working due to an issue with MySQL, rather than Apache. However, the problem is still often a port conflict, which means that by now you should have a good idea on how to fix it.
In this case, you’ll need to access your php.ini file instead of your configuration file. Navigating to your XAMPP dashboard and clicking on PHPInfo as we described earlier in this post will enable you to find the path to this file for your installation:
Alternatively, if you’re using XAMPP for Windows, you can access this file from the control panel by click on Config > PHP (php.ini):
Once you find and open php.ini, look for the lines that read port = 3306
, and change them to read port = 3307
. Save and close the file, and then restart MySQL.
Summary
XAMPP is a helpful tool to have in your corner, but it can be frustrating to troubleshoot certain errors that prevent you from accessing your local WordPress site. Fortunately, these are often port conflicts that you can quickly implement workarounds for.
In this article, we showed you what to do if XAMPP isn’t working due to a problem with Apache or MySQL:
- Resolve Apache port conflicts by changing your listening port to 8080.
- Include the listening port in the address when accessing localhost.
- Change your MySQL port to 3307 if another application is blocking the default port 3306.
Don’t forget to check out DevKinsta as an alternative to XAMPP.
Get all your applications, databases and WordPress sites online and under one roof. Our feature-packed, high-performance cloud platform includes:
- Easy setup and management in the MyKinsta dashboard
- 24/7 expert support
- The best Google Cloud Platform hardware and network, powered by Kubernetes for maximum scalability
- An enterprise-level Cloudflare integration for speed and security
- Global audience reach with up to 35 data centers and 275+ PoPs worldwide
Test it yourself with $20 off your first month of Application Hosting or Database Hosting. Explore our plans or talk to sales to find your best fit.
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:
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.
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:
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:
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.
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:
Next, select the Manage Servers tab next to the Welcome tab at the top:
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:
A warning box will appear, stating that the file is 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:
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:
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.
Get all your applications, databases and WordPress sites online and under one roof. Our feature-packed, high-performance cloud platform includes:
- Easy setup and management in the MyKinsta dashboard
- 24/7 expert support
- The best Google Cloud Platform hardware and network, powered by Kubernetes for maximum scalability
- An enterprise-level Cloudflare integration for speed and security
- Global audience reach with up to 35 data centers and 275+ PoPs worldwide
Test it yourself with $20 off your first month of Application Hosting or Database Hosting. Explore our plans or talk to sales to find your best fit.
Есть много возможных ответов на эту проблему. Наиболее распространенным и, скорее всего, является то, что у вас запущена другая программа, которая блокирует порт 80 или 443. Если вы установили Skype, вы нашли свою проблему! Измените настройки порта apache на 81, и apache будет работать. Там есть хороший учебник по этому вопросу. Чтобы проверить это, вы можете открыть свою командную строку, щелкнув меню «Пуск» и набрав «cmd», и введите команду
netstat -nab
этот wil возвращает список программ, которые будут смутно напоминать этот шаблон
[someprogram.exe]
UDP [fe80::numbers:numbers:numbers:numbers%numbers]:portnumber
Вам нужно найти строку (или строки), заканчивающуюся на: 80, и завершить их, чтобы запустить apache. Если строка не заканчивается на: 80, вы можете сделать больше вещей.
Сначала перейдите в каталог xampp (по умолчанию — c:xampp) и дважды щелкните apache_start.bat. Это откроет линию comand и вернет более подробные ошибки о том, почему apache не может работать. В основном, нужно искать синтаксические ошибки, которые вы могли бы создать, отредактировав файлы httpd.conf или httpd-ssl.conf. Это очень легко сделать, если вы отредактировали его и стали новым пользователем.
Если это не удается, ваша последняя надежда — проверить журнал ошибок apache, щелкнув вкладку журналов в строке apache на панели управления xampp и щелкнув журнал ошибок.
Если ничего из этого не получится, не сдавайтесь! Вы получили это!
Изменить: Если вы измените порт apache, вам также придется перейти в httpd.conf(расположенный в xampp/apache/conf) и около строки 184, замените
ServerName localhost:80
с
ServerName localhost:81
Также можно указать порт 81 в URL вашего локального хоста, т.е.
локальный: 81/my_project.php
Перейти к содержимому
Ошибка была вызвана двумя причинами:
1) Skype занимал 80 и 443 порт. Решается она так: Skype>Инструменты>Настройки…>Дополнительно>Соединение. Снять галочку напротив «Для дополнительных входящих соединений следует использовать порты 80 и 443». Другой путь решения проблемы — менять порты в настройках Xampp и apache
2) Синтаксические ошибки в httpd.conf. При этом файлы error.log и access.log были пустые. Ошибки удалось увидеть толко благодаря прямому запуску apache через консоль: C:xamppapachebinhttpd.exe
Полный текст ошибки:
15:58:23 [Apache] Error: Apache shutdown unexpectedly.
15:58:23 [Apache] This may be due to a blocked port, missing dependencies,
15:58:23 [Apache] improper privileges, a crash, or a shutdown by another method.
15:58:23 [Apache] Press the Logs button to view error logs and check
15:58:23 [Apache] the Windows Event Viewer for more clues
15:58:23 [Apache] If you need more help, copy and post this
15:58:23 [Apache] entire log window on the forums
Я успешно установил XAMPP (xampp-win32-1.8.2-0-VC9-installer.exe) в Windows 7. Но, к сожалению, во время запуска Apache из панели управления XAMPP была обнаружена следующая ошибка:
Есть много возможных ответов на эту проблему. Наиболее распространенным и, скорее всего, является то, что у вас запущена другая программа, которая блокирует порт 80 или 443. Если вы установили Skype, вы нашли свою проблему! Измените настройки порта Apache на 81, и apache будет работать. Там есть хороший учебник. Чтобы проверить это, вы можете открыть свою командную строку, щелкнув меню «Пуск» и набрав «cmd», и введите команду
netstat -nab
этот wil возвращает список программ, которые будут смутно напоминать этот шаблон
[someprogram.exe] UDP [fe80::numbers:numbers:numbers:numbers%numbers]:portnumber
Вам нужно найти строку (или строки), заканчивающуюся на: 80, и прекратить их, чтобы запустить apache. Если нет строки, заканчивающейся на: 80, есть больше вещей, которые вы можете сделать.
Сначала перейдите в каталог xampp (по умолчанию – c: xampp) и дважды щелкните apache_start.bat. Это откроет линию comand и вернет более подробные ошибки о том, почему apache не может работать. В основном, нужно искать синтаксические ошибки, которые вы могли бы создать, отредактировав файлы httpd.conf или httpd-ssl.conf. Это очень легко сделать, если вы отредактировали его и стали новым пользователем.
Если все же это не удается, ваша последняя надежда – проверить журнал ошибок apache, щелкнув вкладку журналов в строке apache на панели управления xampp и щелкнув журнал ошибок.
Если это не работает, не сдавайтесь! Ты получил это!
Изменить: если вы измените порт apache, вам также нужно будет перейти в httpd.conf (расположенный в xampp / apache / conf) и около строки 184, заменить
ServerName localhost:80
с
ServerName localhost:81
Также можно указать порт 81 в URL вашего локального хоста, т. Е.
локальный: 81 / my_project.php
1. Перейдите в xampp/apache/conf/httpd.conf
и откройте его.
В файле httpd.conf
в line 176
Заменить
ServerName localhost:80
с
ServerName localhost:81
Это будет работать.
2. Даже если вышеуказанная процедура не работает. Затем в том же файле ( httpd.conf
) в строке 45 замените
#Listen 0.0.0.0:80 #Listen [::]:80 Listen 80
с
#Listen 0.0.0.0:81 #Listen [::]:81 Listen 81
Я обнаружил, что панель управления XAMPP под Windows (Windows 7 в моем случае) не отражает то, что на самом деле происходит, если вы не запустили ее с помощью «Запуск от имени администратора».
Сопровождая ответ Тиммей, вам нужно сделать два изменения –
Слушайте 80 -> Слушайте 81 (около строки 58)
ServerName localhost: 80 -> ServerName localhost: 81 (около строки 218)
только что изменил 2 строки
Listen 80 to Listen 81 ServerName localhost:80 to ServerName localhost:81
и начать использовать привилегии администратора
Проверьте, установлен ли Skype на вашем компьютере.
Войдите в систему и выберите «Сервис» – «Параметры» – «Дополнительно» – установите и снимите флажок, в котором говорится, что порт использования 80
–
Проверьте, установлена ли служба Apache, запуская службу services.msc из командной строки запуска.
Как удалить службу из командной строки? sc удалить «serviceName»
Помните, что имя службы должно быть заменено точным именем службы Apache, как показано в списке услуг.
Проверьте, работает ли IIS и занимает порт 80. Если это так, отключите его.
–
Проверьте, запущен ли AVP (Kaspersky) и занимает порт 80. Если это так, добавьте httpd.exe в качестве исключения для разрешенных программ.
–
Надеюсь, поможет.
Вы выполнили сценарий «setup_xampp.bat»? Он находится внутри папки XAMPP и должен выполняться каждый раз при изменении папки XAMPP.
Я установил рабочую станцию VMWare. Таким образом, это вызывало ошибку.
Services.msc and stopped the 'Workstation' Services.
Это решило мои проблемы.
благодаря
Если вы установили Skype, проверьте этот параметр.
Другой случай – Windows 10
Проверь это:
- Перейдите в меню «Пуск», введите services.msc
- Прокрутите страницу вниз в окне «Службы», чтобы найти службу публикации World Wide Web.
- Щелкните его правой кнопкой мыши и выберите «Стоп» или «Отключить», если вы просто хотите использовать только XAMPP.
я обнаружил, что аналогичная проблема в моей системе, и это было из skype, установленного до установки xampp. У меня такая же ошибка. для исправления ошибки я следил за ними,
- вышли на скайп какое-то время,
- перезапустил apache с панели управления xampp,
- проверен на браузере, независимо от того, работал он или нет, по http: // localhost /
- это сработало,
- снова присоединился к скайпу,
- все работает отлично, так просто, как это
Мне не нужно было ничего устанавливать или удалять, и это работало для меня менее чем за 1 минуту.
ура
Если вы столкнулись с этой проблемой сразу после полной установки Windows :
Похоже, что программа установки уже запускает процесс http.exe и блокирует начальный порт 80, но не отражает это состояние на панели управления.
Чтобы проверить, просто проверьте наличие работающего сервера в своем браузере. Введите в адресную строку браузера:
локальный
Если это отображает панель управления XAMPP, все в порядке. Кроме того, проверьте диспетчер задач для запуска процесса «Apache HTTP Server» (httpd.exe).
Вы можете остановить процесс apache с помощью xampp_stop.exe в своей базовой папке xampp. Затем панель управления XAMPP должна работать должным образом.
В моем случае проблема заключалась в том, что оба порта 80 и 443 были использованы: шаги для его устранения:
- Откройте xampp и нажмите кнопку конфигурации
- Теперь нажмите (appache) httpd.conf (Откройте в блокноте или другом редакторе)
- Теперь нажмите ctrl + h .
- Найдите
80
и замените на8080
- Теперь сохраните и нажмите «Appache» (httpd-ssl.conf).
- Теперь найдите
443
и замените на4430
. - Теперь ваш xampp должен работать нормально, поскольку оба этих кода никогда не используются другими программами в вашей системе.
Если вы установили SQL Express или любой .Net-сервер, вам необходимо остановиться. откройте cmd в режиме администратора и введите эту строку …
сетчатая остановка
теперь начинаем апач
$$$$$$$$ Лучший способ сделать это $$$$$$$$$
Другие методы, описанные выше, заставят вас застрять во многих местах. Не переходите на смену порта.
2 Step Process
1) Открыть командную строку в качестве администратора
2) введите «net stop http» (если он говорит, что он не идентифицирует ключевое слово, то это связано только с тем, что в PATH переменной среды окружающей среды нет пути к программным файлам / System32, которые вы можете найти, как это сделать) Нажмите Y на каждом месте, о котором вы просите, не беспокоитесь. Вы не останавливаете какой-либо важный процесс только на каком-то процессе, который взял ваш порт. Анн, этот процесс снова захватит ваш порт, если вы не работаете.
Наслаждаться !!
У меня есть решение. У меня была эта проблема и исследование решения, но мне это не удалось. Поэтому я загрузил новую версию XAMPP и нажал на опцию netstats внутри программы.
Там он дал мне список программ и порты, которые они использовали, и поэтому я посмотрел и не имел программы, использующей порт 80
, но apache за пределами 80
также использует порт 443
… и была эта программа под названием Pando Media Boster, эта дверь, я начал менеджер задач и завершил процесс pando Average boster. Надеюсь, это помогло :).
Возможно, вы изменили конфигурационный файл в «httpd-ssl.conf»
<VirtualHost _default_:443> DocumentRoot "D:/Server/xServer" ServerName xyz.abc.com SSLCertificateFile "conf/ssl.crt/xyz.crt" SSLCertificateKeyFile "conf/ssl.key/sftaps.in.key" </VirtualHost>
Может быть, вы меняете имя сертификата или что-то в папке Apache.
Могут быть много методов для решения этой проблемы, но здесь простейший:
Перейдите к управлению XAMPP и …
Запустить от имени администратора
Это все..
Это Золотая точка для любой такой ненормальности.
Концепция работы
На самом деле всем службам в Xampp нужна зависимость портов. Что происходит, когда нет специальных полномочий, предоставляемых xampp, он ищет только определенные предопределенные порты для запуска этих служб. И, если в случае, эти порты как-то уже заняты … eek! служба не может быть запущена.
Но если мы дадим сверхдержаву нашему Xampp-контролю (запустив его как администратор), он каким-то образом справится и, безусловно, на земле запустит службы на портах. И торжество! Ты сделал это.
Постоянный совет для моего дорогого брата и сестер
Чтобы сделать все возможное, выполните следующие действия:
- щелкните правой кнопкой мыши файл xampp-control.exe и перейдите к свойствам.
- Перейдите на вкладку Совместимость .
- В приведенных ниже настройках установите флажок Запустить эту программу в качестве администратора .
- Примените изменения. И все готово.
Теперь, каждый раз, когда вы запускаете приложение, оно запускается с статусом администратора, и вам вообще не нужно заботиться о портах.
Даже если вы настроили Apache для прослушивания на другом порту, вы все равно получите эту ошибку, если другая программа использует порт SSL по умолчанию 443.
Вам также нужно отредактировать файл http-ssl.conf и изменить строку Listen 443 и изменить номер порта там.
Я также столкнулся с той же проблемой. И я нашел легкое и быстрое решение.
Единственное, что вам нужно сделать, – это запускать XAMPP-сервер как администратор каждый раз.
введите описание изображения здесь
Салам,
Вам не нужно менять номер порта.
только перейдите в диспетчер задач и завершите работу с любыми другими запущенными программами.
и тогда вы можете НАЧАТЬ APACHE …….
С уважением,
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