48)地址已在使用中:AH00072:make_sock:无法绑定到地址[::]:80 [英] 48)Address already in use: AH00072: make_sock: could not bind to address [::]:80
问题描述
当我尝试访问任何文件夹或文件时出现apache错误,它返回Http Not found
或Forbidden
我正在尝试重新启动并启动apache
I get a apache error when I try access to anything folder or file, it returns Http Not found
or Forbidden
I am trying restart and start apache
sudo apachectl restart
输出:
(48)Address already in use: AH00072: make_sock: could not bind to address [::]:80
(48)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
我正试图阻止它
sudo apachectl stop
输出
httpd (no pid file) not running
我运行sudo lsof -i:80
输出:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
httpd 8904 root 5u IPv6 0x21884d81f1597d8f 0t0 TCP *:http (LISTEN)
httpd 9012 _www 5u IPv6 0x21884d81f1597d8f 0t0 TCP *:http (LISTEN)
httpd 12726 _www 5u IPv6 0x21884d81f1597d8f 0t0 TCP *:http (LISTEN)
httpd 12731 _www 5u IPv6 0x21884d81f1597d8f 0t0 TCP *:http (LISTEN)
httpd 12732 _www 5u IPv6 0x21884d81f1597d8f 0t0 TCP *:http (LISTEN)
有什么办法解决吗?
有用的信息:
OS X El Capitan
推荐答案
在我的装有Mojave(10.14.1)的Mac中,突然Apache无法再提供IPV4了,然后给了我ERROR403.我试图杀死所有的Apache (sudo killall httpd)...正在检查de PID的打开状态(sudo lsof | grep AMP | grep apache)...甚至无法正常工作...只是ipv6可用...仍然错误403.
In my Mac with Mojave (10.14.1) suddenly Apache couldn't give to serve ipv4 anymore, then gave me ERROR 403. I tried to kill all apache (sudo killall httpd)... checking de PID's on (sudo lsof | grep AMP | grep apache)... even didn't work... just ipv6 was available... still ERROR 403.
最适合我的方法:禁用OSX的内置Apache服务器.
What works for me: Disable OSX's built-in Apache server.
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
之后:
sudo apachectl -k restart
开心:)
这篇关于48)地址已在使用中:AH00072:make_sock:无法绑定到地址[::]:80的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!