上篇文章我们讲到Win XP IIS不能建立多个网站,所以就想着安装一个Apache服务器。具体安装方法可以查看Windows下安装Apache+PHP+MySQL的方法(附图)。安装完成后,启动Apache报错,Apache2服务因1(0x1)服务性错误而停止。查看了Windows的错误日志(计算机管理-事件查看器)发现错误信息有好几条:
The Apache service named reported the following error:
>>> Unable to open logs.
The Apache service named reported the following error:
>>> Warning: DocumentRoot [F:/var/www/fanjiexi] does not exist.
The Apache service named reported the following error:
>>> no listening sockets available, shutting down.
最关键的信息应该是最后一条,看起来似乎默认的监听端口不可使用。我的Apache默认端口是80,应该是80端口被占用了,干掉80端口使用的程序或者更改Apache的默认端口即可解决此问题。具体方法请看: Apache80端口被占用,修改IIS80端口的方法。