如何在 mac 下配置 php 运行环境
1、打开 httpd.conf 配置
以下是使用 vscode 打开
code /etc/apache2/httpd.conf
2、修改 httpd.conf 配置文件
<Directory />
AllowOverride none
Require all denied
</Directory>
DocumentRoot "/Users/mymac/Desktop/Project"
<Directory "/Users/mymac/Desktop/Project">
Options FollowSymLinks Multiviews
MultiviewsMatch Any
AllowOverride None
Require all granted
</Directory>
3、检查配置目录的读写权限
4、启动 appache 就行
# 启动
sudo apachectl start
# 重启
sudo apachectl restart