Apache 意外关闭 [英] Apache shutdown unexpectedly

查看:95
本文介绍了Apache 意外关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 XAMPPS 从我的机器上托管 PHP 文件.我最近安装了 XAMPP,但我无法启动 Apache 服务,因为 PID 4 - NT Kernel & 正在使用端口 80系统.

I am using XAMPPS to host PHP files from my machine. I have recently installed XAMPPs but I am unable to start Apache service as port 80 is in use by PID 4 - NT Kernel & System.

我知道通过使用不同的端口(例如 httpd.conf 中的端口 8080 等更改)将解决此问题.但是,我需要端口 80 由 PID 4 进程释放并分配给 Apache 服务.我过去这样做过,但随着时间的推移忘记了解决步骤.请帮我修复它

I know by using a different port (such as port 8080 etc change in httpd.conf) will get to a workaround for this issue. However I need port 80 to be released by PID 4 process and allocated to Apache service. I have done that in the past but have forgotten the resolution steps over the time. Please help me fix it

这是我在启动 Apache 时遇到的错误

This is the error I am encountering while starting Apache

`11:19:52 AM  [Apache]  Error: Apache shutdown unexpectedly.`
`11:19:52 AM  [Apache]  This may be due to a blocked port, missing dependencies,` 
`11:19:52 AM  [Apache]  improper privileges, a crash, or a shutdown by another method.`
`11:19:52 AM  [Apache]  Press the Logs button to view error logs and check`
`11:19:52 AM  [Apache]  the Windows Event Viewer for more clues`
`11:19:52 AM  [Apache]  If you need more help, copy and post this`
`11:19:52 AM  [Apache]  entire log window on the forums`

来自 apache 错误日志文件的日志:

Logs from apache error log file:

[Wed Jul 03 00:54:17.004882 2013] [mpm_winnt:notice] [pid 248:tid 240] AH00354: Child: Starting 150 worker threads.
[Wed Jul 03 01:17:37.485351 2013] [mpm_winnt:notice] [pid 4200:tid 228] AH00428:    Parent: child process 248 exited with status 1073807364 -- Restarting.
[Wed Jul 03 08:51:45.875976 2013] [ssl:warn] [pid 400:tid 228] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Wed Jul 03 08:51:46.188476 2013] [core:warn] [pid 400:tid 228] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Wed Jul 03 08:51:46.844726 2013] [ssl:warn] [pid 400:tid 228] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Wed Jul 03 08:51:49.047851 2013] [mpm_winnt:notice] [pid 400:tid 228] AH00455: Apache/2.4.4 (Win32) OpenSSL/0.9.8y PHP/5.4.16 configured -- resuming normal operations
[Wed Jul 03 08:51:49.047851 2013] [mpm_winnt:notice] [pid 400:tid 228] AH00456: Server built: Feb 23 2013 13:07:34
[Wed Jul 03 08:51:49.047851 2013] [core:notice] [pid 400:tid 228] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache
[Wed Jul 03 08:51:49.063476 2013] [mpm_winnt:notice] [pid 400:tid 228] AH00418: Parent: Created child process 5384
[Wed Jul 03 08:51:50.579101 2013] [ssl:warn] [pid 5384:tid 240] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Wed Jul 03 08:51:51.579101 2013] [ssl:warn] [pid 5384:tid 240] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Wed Jul 03 08:51:51.750976 2013] [mpm_winnt:notice] [pid 5384:tid 240] AH00354: Child: Starting 150 worker threads.

注意:我没有 IIS、网络客户端、全球网络服务.

NOTE: I DO NOT HAVE IIS, WEB CLIENT, WORLD WIDE WEB SERVICE.

推荐答案

在您的 XAMPP 控制面板上,在 apache 旁边,选择配置"选项并选择第一个文件 (httpd.conf):

on your XAMPP control panel, next to apache, select the "Config" option and select the first file (httpd.conf):

在那里,查找listen"行(您可以使用记事本中的查找工具),并且必须有一行说明Listen 80".注意:还有其他带有listen"的行,但它们应该被注释(以 # 开头),您需要更改的是准确地说listen 80"的那一行.现在将其更改为聆听 1337".

there, look for the "listen" line (you may use the find tool in the notepad) and there must be a line stating "Listen 80". Note: there are other lines with "listen" on them but they should be commented (start with a #), the one you need to change is the one saying exactly "listen 80". Now change it to "Listen 1337".

立即启动 apache.

Start apache now.

如果错误仍然存​​在,那是因为有另一个端口已在使用中.因此,再次选择配置选项(在 xampp 控制面板中的 apache 旁边),这次选择第二个选项 (httpd-ssl.conf):

If the error subsists, it's because there's another port that's already in use. So, select the config option again (next to apache in your xampp control panel) and select the second option this time (httpd-ssl.conf):

在那里,查找Listen 443"行并将其更改为Listen 7331".

there, look for the line "Listen 443" and change it to "Listen 7331".

启动 apache,它现在应该可以工作了.

Start apache, it should be working now.

这篇关于Apache 意外关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆