Mac Apache Web 服务器将不再启动并且找不到任何 Web 目录 [英] Mac Apache web server won't start anymore and can't find any web directories
问题描述
我使用的是 Mac Yosemite 10.10.5.Apache Web 服务器突然不再启动.我尝试将端口更改为 8080.还尝试了 sudo apachectl stop 和 sudo apachectl start.还是打不开.
I'm on Mac Yosemite 10.10.5. Apache web server suddenly no longer starts. I tried changing the port to 8080. Also tried sudo apachectl stop and sudo apachectl start. Still won't open.
我认为这可能是在添加新打印机并启用打印共享后发生的.我把它关了,它仍然无法启动.我不记得我运行的哪个命令给了我这个包含更多细节的消息.
I thought this may have happened after adding a new printer and enabling print sharing. I turned that off and it still won't start. I can't remember which command I ran that gave me this message with some more details.
更新:当我使用 sudo apachectl start
时,我注意到服务器可以通过浏览器访问,即使界面仍然显示已停止,但是当我转到 localhost/webdirectory 时,我只是找不到.
UPDATE: When I use sudo apachectl start
, I noticed the server is accessible through the browser even though the interface still says STOPPED, but when I go to localhost/webdirectory I just get not found.
推荐答案
经过 48 小时的研究,我找到了这个可行的解决方案,我找到了解决方案 这里:禁用 OSX 的内置 Apache 服务器.
After 48 hours of research, I found this working solution, I found the solution here: disable OSX's built-in Apache server.
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
这允许 XAMPP 在 80 上启动,而 POW 在 20559 上运行.
This allowed XAMPP to start on 80, while POW runs on 20559.
这篇关于Mac Apache Web 服务器将不再启动并且找不到任何 Web 目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!