Mac OS X 自带了 Apache 和 PHP 环境,我们只需要简单的启动它就行了。
- 防火墙
- 启动Apache
1.命令:sudo apachectl start
Apache服务器默认的web根目录在:/Library/WebServer/Documents
Apache的配置文件在:/etc/apache2
2.相关命令:
停止 Apache:sudo apachectl stop
重启 Apache:sudo apachectl restart
回车,需要输入电脑登录密码,确定后进入 - 从当前目录打开终端
操作过程
https://www.sohu.com/a/208062635_100015598