mac下安装 xampp 没法启动apache,多半缘由是因为系统自带的Apache已经在开启了,引发冲突。web
1.查看端口是否被占用
sudo lsof -i -napache
2.用终端运行xampp,查看具体的错误
sudo su /Applications/XAMPP/xamppfiles/xampp startserver
多半是这个问题: XAMPP: Starting Apache...fail. XAMPP: Another web server is already running.图片
解决办法: **sudo apachectl stop **
// This command killed Apache server that was pre-installed on MAC OS X.get
参考:http://stackoverflow.com/questions/4582504/xampp-apache-webserver-localhost-not-working-on-mac-osit