zoukankan      html  css  js  c++  java
  • Nginx 相关命令

    Nginx 相关命令

    nginx 启动

    ./nginx -c /usr/local/webserver/nginx/conf/nginx.conf
    

    其中,/usr/local/webserver/nginx/conf/nginx.conf 是 nginx.conf 路径

    • -c参数指定加载的 nginx.conf 配置文件路径

    nginx 重启
    进入 nginx 安装目录下的 sbin 目录下
    执行

    ./nginx -s reload
    

    查找 nginx 所在位置

    whereis nginx
    

    通过配置文件查找

    locate nginx.conf
    

    没有安装 locate 命令,find 命令查找

    find / -name nginx.conf 
    

    通过进程查找

    ps aux|grep nginx
    

    查看 nginx 配置文件
    进入 sbin 目录下,执行以下命令

    ./nginx -t
    

    返回类似下列信息

    nginx: the configuration file /usr/local/webserver/nginx/conf/nginx.conf syntax is ok
    nginx: configuration file /usr/local/webserver/nginx/conf/nginx.conf test is successful
    

    则 /usr/local/webserver/nginx/conf/nginx.conf 就是配置文件

    最后修改于 2020年5月4日 22:21:29

  • 相关阅读:
    Codeforces 1009F Dominant Indices
    UOJ #35 后缀排序 哈希做法
    bzoj 3670 [Noi2014]动物园
    动态规划 笔记

    常用模块和面向对象 类
    常用模块
    包的使用和常用模块
    日志
    复习列表,模块
  • 原文地址:https://www.cnblogs.com/ixan/p/12828545.html
Copyright © 2011-2022 走看看