Nginx常用命令

Nginx常用命令

  • 查看版本

    #仅显示nginx版本
    nginx -v

    #
    显示nginx版本、编译器版本以及配置参数
    nginx -V
  • 启动

    #使用默认配置文件启动
    nginx

    #
    指定配置文件加载
    nginx -c  filename
  • 停止

    #快速关闭,可能不保存相关信息,并迅速终止web服务
    nginx -s stop

    #
    正常关闭,保存相关信息
    nginx -s quit
  • 验证

    #验证配置文件的正确性,不运行
    nginx -t

    #
    验证指定位置的配置文件
    nginx -t -c filename
  • 重新加载

    修改nginx配置的话需要重新加载才会生效

    nginx -s reload

https://zhhll.icu/2021/服务器/nginx/2.nginx常用命令/

本文由 mdnice 多平台发布

posted @ 2023-10-09 10:26  拾光师  阅读(20)  评论(0编辑  收藏  举报  来源