apache web server 无法启动 Mac

本文介绍了一种在MacOSX Yosemite上安装AMPPS后遇到Apache无法启动的问题及解决方案。作者尝试了多种方法来解决端口80被占用的情况,并最终通过使用命令`sudokillallhttpd`成功启动了Apache。
摘要由CSDN通过智能技术生成

Hello, 

I'm having an issue with Apache not starting on a band new install of Mac OS X Yosemite (10.10.2). I followed the advice of several threads and here's where I'm at so far. 

I ran: 

Code

sudo /Applications/AMPPS/apache/bin/httpd

and: 

Code

sudo /Applications/AMPSS/apache/bin/httpd -k start

and both gave the same result: 

Code

(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 

What I've tried: 
1. I tried (as suggested somewhere in here) stopping a pre-existing apache with: 

Code

sudo apachectl stop

I get: 

Code

/System/Library/LaunchDaemons/org.apache.httpd.plist: Could not find specified service

2. One place said to try hunting down what is using port 80 by using: 

Code

sudo lsof | grep LISTEN

I couldn't see port 80 anywhere, but I read that maybe :http is the same? I then used ps [pid] on any commands that were run on :httpd and all it says under command is httpd, which I'm guess is in fact apache? But I don't know how to stop them. 

I have found something that works...at least for now. I have not tried restarting yet, so we'll see if it is permanent, but I found on another thread: 

Code

sudo killall httpd

After this, AMPPS worked.

 

ref: http://www.softaculous.com/board/index.php?tid=7235

转载于:https://my.oschina.net/u/1402366/blog/760435

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值