mac下使用brew安装nginx

安装

brew install nginx

启动

brew services start nginx

停止

brew services stop nginx

重启nginx

brew services restart nginx

重新加载配置文件

nginx -s reload

验证nginx配置文件是否正确

nginx -t

配置文件位置

/usr/local/etc/nginx/nginx.conf

阅读 198

推荐阅读