zoukankan      html  css  js  c++  java
  • Linux下的nginx启动、重新启动

    nginx的启动命令是:

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

    -c制定配置文件的路径,不加-nginx会自动加载默认路径的配置文件。

     

    以上是通用的启动命令

     

     

    以下是转载的,对于有以下命令的nginx可以使用,没有以下命令的nginx,可以使用上面的方法

    研究了一下nginx帮助后发现,有-s参数可对nginx服务进行管理:
    # /usr/local/nginx/sbin/nginx -h
    nginx version: nginx/0.7.63
    Usage: nginx [-?hvVt] [-s signal] [-c filename] [-p prefix] [-g directives]

    Options:
    -?,-h : this help
    -v : show version and exit
    -V : show version and configure options then exit
    -t : test configuration and exit
    -s signal : send signal to a master process: stop, quit, reopen, reload 
    -p prefix : set prefix path (default: /usr/local/nginx/)
    -c filename : set configuration file (default: conf/nginx.conf)
    -g directives : set global directives out of configuration file

    于是我执行
    # /usr/local/nginx/sbin/nginx -s  reload 
    nginx已经重启成功

  • 相关阅读:
    晨考总结第二天
    晨考总结第一天
    常用的设计模式总结
    AOP底层原理剖析
    Spring AOP
    jstat统计输出说明
    zabbix 触发器匹配字符串告警
    hive部分常用函数
    nginx日志说明
    windwos文件句柄数限制
  • 原文地址:https://www.cnblogs.com/duanxz/p/4013181.html
Copyright © 2011-2022 走看看