我想运行我的Apache服务器,但我得到这个错误:
# /usr/sbin/httpd -k start (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down AH00015: Unable to open logs
我用netstat来检查哪个进程正在使用这个端口,但是我没有回应:
# netstat -lnp | grep :80 #
在httdp.conf中,如果我更改侦听端口和SSL端口,我可以正确启动我的服务器(但不是我想要的):
Listen 8080 Listen 8443 https
我得到:
# /usr/sbin/httpd -k start #
所以在我的80和443端口上有一个看不见的进程,我无法识别它。 我也重新启动服务器,问题仍然存在。 有任何想法吗?
回答评论中的问题:
# grep -R 'Listen' /etc/httpd Binary file /etc/httpd/modules/mod_heartmonitor.so matches Binary file /etc/httpd/modules/mod_pagespeed_ap24.so matches Binary file /etc/httpd/modules/mod_mpm_prefork.so matches Binary file /etc/httpd/modules/mod_mpm_event.so matches Binary file /etc/httpd/modules/mod_pagespeed.so matches Binary file /etc/httpd/modules/mod_mpm_worker.so matches /etc/httpd/conf.d/mod_jk.conf:Listen *:80 /etc/httpd/conf.d/mod_jk.conf:Listen *:443 /etc/httpd/conf.d/ssl.conf:Listen 443 https /etc/httpd/conf/httpd.conf:# Listen: Allows you to bind Apache to specific IP addresses and/or /etc/httpd/conf/httpd.conf:# Change this to Listen on specific IP addresses as shown below to /etc/httpd/conf/httpd.conf:#Listen 12.34.56.78:80 /etc/httpd/conf/httpd.conf:Listen 80
这可能是因为你在httpd.conf和conf.d/*.conf包含了多个Listen指令。
重叠侦听指令将导致致命的错误,这将阻止服务器启动。