brew 安装
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
安装路径:
/usr/local/Cellar/nginx/1.17.0
配置文件路径:
/usr/local/etc/nginx/nginx.conf
服务器默认路径:
/usr/local/var/www
查看nginx版本
nginx -v
启动nginx服务
sudo brew services start nginx
重新启动nginx服务
sudo brew services restart nginx
停止 nginx 服务器
sudo nginx -s stop
关闭nginx服务
sudo brew services stop nginx
修改 nginx.conf 后,重载配置文件
sudo nginx -s reload
网友评论