ngxin修改配置重启


ngxin修改配置重启
 
1 修改nginx.conf
 
ps -ef |grep ngxin
 
kill -QUIT 主进程号
 
/usr/local/nginx/sbin/nginx -s reload
 
nginx: [error] open() "/usr/local/nginx/logs/nginx.pid" failed
 
 
 
改用
 
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
 
重启成功
 
 
 
原因
 
nginx -s reload is only used to tell a running nginx process to reload its config. After a stop, you don't have a running nginx process to send a signal to. Just run nginx (possibly with a -c /path/to/config/file)
 
于是我用了这方法,也就是nginx -c /path/to/config/file)  //在我机器上是这样的/alidata/server/nginx/sbin/nginx -c /alidata/server/nginx/conf/nginx.conf

相关内容

    暂无相关文章