C:\Apache24\bin>httpd.exe -k install
它的输出如下:
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作为服务,但无法启动。看起来本地主机端口80正在使用。这就是"[::]:80"的含义吗?
然后我停止了我留下运行的Apache 2.0服务和MySQL服务,希望停止其中一个可以释放本地主机端口80。
我还运行netstat -o查看端口80是否正在使用。没有使用。
但是,我发现上述套接字正在被一个进程使用,这是一个正在监听上述套接字的进程。
TCP [::]:80 User-PC:0 LISTENING 4
我随后运行了tasklist命令,并发现System正在使用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无法绑定到套接字,而这些套接字对我来说看起来像是本地主机端口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
有人能告诉我我做错了什么吗?