找到nginx bin目录:whereis nginx

直接执行bin

  1. 使用配置文件启动nginxnginx -c /usr/local/nginx/conf/nginx.conf
  2. 检查配置文件:/usr/local/nginx/sbin/nginx -t
  3. 重新加载:/usr/local/nginx/sbin/nginx -s reload
  4. 快速停止:/usr/local/nginx/sbin/nginx -s stop
  5. 正常停止或者关闭:/usr/local/nginx/sbin/nginx -s quit

Systemctl

  1. 重启:systemctl restart nginx
  2. 重载: systemctl reload nginx