运行命令 brew services restart nginx 查看端口号占用情况 lsof -i :端口号 查看端口号运行的项目目录 nginx -t 编辑配置文件 vim 文件目录 关闭进程 kill -9 PID