Apache无法在examplep版本3.2.2中工作


Apache Not working in xampp version 3.2.2

当我使用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.

我很困惑,不知道如何修复它。

如果您的skype已打开,您可能会退出程序,因为skype使用端口80

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

试试这个:

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

  • 在文本或代码编辑器上打开httpd.config文件,该文件应位于C:'xampp'apache'conf'httpd.conf
  • 搜索"听80"
  • 将80更改为任何其他端口号,例如–9080
  • 启动XAMPP

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

那你应该没事了。

如果不起作用,请执行相同的过程,再次将端口更改为80,然后继续方法2。

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

注意:除非您运行的是一些依赖于MicrosoftIISWeb服务器的软件,否则停止它时应该没问题。

要停止此服务,您可以按照本视频教程进行操作。