我试图在我的 Windows 7 系统上安装和运行 apache 2.4 我去了 apache 2.4 bin 目录并运行以下命令: 注意:我以管理员身份打开了 cmd 窗口。C:\Apache24\bin>httpd.exe -k 安装
它的输出如下:
Installing the Apache2.4 service
The Apache2.4 service is successfully installed.
Testing httpd.conf....
Errors reported here must be corrected before the service can be started.
(OS 10013)An attempt was made to access a socket in a way forbidden by its acces
s permissions. : AH00072: make_sock: could not bind to address [::]:80
(OS 10013)An attempt was made to access a socket in a way forbidden by its acces
s permissions. : AH00072: make_sock: could not bind to address 0.0.0.0:80
AH00451: no listening sockets available, shutting down
AH00015: Unable to open log
所以它安装了 apache 2.4 作为服务,但它无法启动。似乎正在使用 localhost 端口 80。这就是“[::]:80”的意思吗?
然后我停止了我一直运行的 apache 2.0 服务和 mysql 服务,希望停止其中一个服务可以释放 localhost 端口 80。
我还运行 netstat -o 以查看是否正在使用端口 80。不是。
但是,然后我发现一个进程正在使用上面的套接字,它是一个正在侦听上面的套接字的进程
TCP [::]:80 User-PC:0 LISTENING 4
然后我运行任务列表,发现系统正在使用 pid 4。4 在 pid 列下
System 4 Services 0 544 K
最后,由于尝试启动服务失败,我收到了一个错误,该错误记录在 Windows 系统事件中。
Log Name: System
Source: Service Control Manager
Date: 2/21/2013 1:58:03 PM
Event ID: 7024
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: User-PC
Description:
The Apache2.4 service terminated with service-specific error Incorrect function.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Service Control Manager" Guid="{555908d1-a6d7-4695-8e1e-26931d2012f4}" EventSourceName="Service Control Manager" />
<EventID Qualifiers="49152">7024</EventID>
<Version>0</Version>
<Level>2</Level>
<Task>0</Task>
<Opcode>0</Opcode>
<Keywords>0x8080000000000000</Keywords>
<TimeCreated SystemTime="2013-02-21T18:58:03.723988900Z" />
<EventRecordID>87756</EventRecordID>
<Correlation />
<Execution ProcessID="560" ThreadID="7596" />
<Channel>System</Channel>
<Computer>User-PC</Computer>
<Security />
</System>
<EventData>
<Data Name="param1">Apache2.4</Data>
<Data Name="param2">%%1</Data>
</EventData>
</Event>
尝试开始时的错误表明,由于缺乏访问权限,make-sock 无法绑定到在我看来类似于 localhost 端口 80 的套接字。例如,
(OS 10013)An attempt was made to access a socket in a way forbidden by its acces
s permissions. : AH00072: make_sock: could not bind to address [::]:80
谁能告诉我做错了什么?