Mac 系统自带
Apache httpd,开机启动,占用 80 端口
停止 httpd, 关闭开机启动
停用
sudo apachectl stop
关闭开机启动
sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist
安装 nginx,开启开机启动
安装
brew install nginx
修改配置
vim /opt/homebrew/etc/nginx/nginx.conf
设置开机启动
homebrew 安装后,在 nginx 根目录下有开机启动配置文件
homebrew.mxcl.nginx.plist,复制到用户开机启动目录即可
cp /opt/homebrew/Cellar/nginx/1.25.1_1/homebrew.mxcl.nginx.plist ~/Library/LaunchAgents/