国语自产精品视频在线看:您身边最放心的安全下载站! 最新软件|热门排行|软件分类|软件专题|厂商大全

国语自产精品视频在线看

技术教程
您的位置:首页服务器类Web服务器 → 一句简单命令重启nginx

一句简单命令重启nginx

我要评论 2012/09/28 22:14:08 来源:国语自产精品视频在线看 编辑:zbbingyang.com [ ] 评论:0 点击:190次

最近我🚴的多个【de duō gè】VPS经常出🤮现502错误【cuò wù】🍏,经常需【jīng cháng xū】😮要重启nginx,但网上的很多【de hěn duō】教程都需要繁【xū yào fán】琐的启动脚本🤚,远不如apache的重启🏾命令那【mìng lìng nà】么简单。

但研究【dàn yán jiū】🚀了一下nginx帮助后发现【fā xiàn】🏾,有【yǒu】-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

于是我【yú shì wǒ】🐐执行
# /usr/local/nginx/sbin/nginx -s reload
nginx已经重启成功【qǐ chéng gōng】💨

用root权限

#killall nginx

#nginx

其它相关命令:

1.显示【xiǎn shì】nginx进行💓id
#ps -aux | grep nginx

2.结果nginx的【de】master进行👹pid
#kill -HUP 635

3.重启ngnix
#nginx

关键词:nginx

阅读本文后您有什么感想? 已有 人给出评价!

  • 0 欢迎喜欢
  • 0 白痴
  • 0 拜托
  • 0 哇
  • 0 加油
  • 0 鄙视