1.安装homebrew。
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
选择清华镜像
2.安装php+nginx+redis
刷新php链接 brew link php@7.4
3.配置nginx+php
修改上面这三个地方
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
#找到上面这句话,改成下面这样
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
还像上面那样,打开 /opt/homebrew/etc/php/7.4/ 目录
打开 php-fpm.conf
把图上两处前面的分号去掉
回到终端
sudo brew services restart nginx
sudo nginx
sudo php-fpm