Mac下nginx安装:brew install nginx
nginx命令:
查看nginx配置文件地址:
nginx -t
停止:
nginx -s quit。温和停止
nginx -s stop。立即停止
systemctl stop nginx.service。
启动:
nginx
nginx -c "配置文件目录"
systemctl start nginx.service
ps aux | grep nginx
ps -ef | grep nginx
重启:
systemctl restart nginx.service
重新载入配置文件:
nginx -s reload