Apache不适用于xampp版本3.2.2

时间:2015-12-30 18:34:28

标签: php html apache logging xampp

当我使用XAMPP v3.2.2启动apache服务器时,它出现错误提示:

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

然后我进入错误文件位,它说:

[Wed Dec 30 18:12:12.892830 2015] [ssl:warn] [pid 11372:tid 512] AH01909: www.example.com:443:0 server certificate does NOT include anID which matches the server name 
[Wed Dec 30 18:12:13.066839 2015] [ssl:warn] [pid 11372:tid 512] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name 
[Wed Dec 30 18:12:13.134845 2015] [mpm_winnt:notice] [pid 11372:tid 512] AH00455: Apache/2.4.18 (Win32) OpenSSL/1.0.2e PHP/7.0.0 configured -- resuming normal operations 
[Wed Dec 30 18:12:13.134845 2015] [mpm_winnt:notice] [pid 11372:tid 512] AH00456: Apache Lounge VC14 Server built: Dec  9 2015 10:17:39 
[Wed Dec 30 18:12:13.134845 2015] [core:notice] [pid 11372:tid 512] AH00094: Command line: 'C:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache' 
[Wed Dec 30 18:12:13.142847 2015] [mpm_winnt:notice] [pid 11372:tid 512] AH00418: Parent: Created child process 4144 
[Wed Dec 30 18:12:13.900887 2015] [ssl:warn] [pid 4144:tid 564] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name 
[Wed Dec 30 18:12:14.074292 2015] [ssl:warn] [pid 4144:tid 564] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name 
[Wed Dec 30 18:12:14.134295 2015] [mpm_winnt:notice] [pid 4144:tid 564] AH00354: Child: Starting 150 worker threads.

我很困惑,不知道如何解决它。

2 个答案:

答案 0 :(得分:0)

如果您的Skype已开启 - 您可能会退出该程序,因为Skype正在使用端口80

答案 1 :(得分:0)

经过一番研究后,我发现Win 10可能在端口80上运行了一个名为“万维网发布服务”的服务。您需要做的是停止此服务或更改Apache端口,如下所示:

试试这个:

方法1.更改Apache默认端口:

  • 在文本或代码编辑器上打开文件httpd.config - 它应位于C:\xampp\apache\conf\httpd.conf
  • 搜索“Listen 80”。
  • 将80更改为任何其他端口号,例如 - 9080
  • 启动XAMPP。

要访问您的本地主机,请打开浏览器并输入:localhost:9080/sitefolder/,而不只是localhost/sitefolder/

那你应该没事。

如果它不起作用,请重复相同的过程再次将端口更改为80并继续执行方法2.

方法2:停止万维网发布服务。

注意:除非您运行的某些软件依赖于Microsoft IIS Web服务器,否则在停止它时应该没问题。

要停止此服务,您可以按照此video tutorial

进行操作