zoukankan      html  css  js  c++  java
  • nginx 使有和及异常处理

     

    以下内容来源于网络:

    nginx: [error] invalid PID number “” in “/usr/local/var/run/nginx/nginx.pid”

     JackSun    2014年9月1日   暂无评论
     

    在Mac上用brew安装Nginx,然后修改Nginx配置文件,再重启时报出如下错误:

    nginx: [error] invalid PID number "" in "/usr/local/var/run/nginx/nginx.pid"
    

    解决办法:

    $ sudo nginx -c /usr/local/etc/nginx/nginx.conf
     
    $ sudo nginx -s reload



    以下是转载的,对于有以下命令的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已经重启成功

  • 相关阅读:
    梯度下降法
    超平面
    感知机模型
    三角不等式
    统计学习方法基本概念
    Kaggle 的注册和使用
    win10 部署 Anaconda
    全概率和贝叶斯公式
    行列式
    伴随矩阵
  • 原文地址:https://www.cnblogs.com/hnucdj/p/4896777.html
Copyright © 2011-2022 走看看