<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/ DTD/wml_1.1.xml">

<wml>
<head>
<meta http-equiv="cache-control" content="max-age=180,private" />
</head>
<card title="nginx服务管理">
<p>
作者:<a href="index.php?action=showuser&amp;userid=1&amp;hash=">熊茂祥</a><br />时间:2010-09-03 10:59<br />分类:<a href="index.php?action=list&amp;cid=5&amp;hash=">技术文档</a><br />标签:<a href="index.php?action=tags&amp;item=nginx&amp;hash=">nginx</a>, <a href="index.php?action=tags&amp;item=%E5%8F%82%E6%95%B0&amp;hash=">参数</a>, <a href="index.php?action=tags&amp;item=%E5%91%BD%E4%BB%A4&amp;hash=">命令</a>, <a href="index.php?action=tags&amp;item=%E6%9C%8D%E5%8A%A1&amp;hash=">服务</a>, <a href="index.php?action=tags&amp;item=%E7%AE%A1%E7%90%86&amp;hash=">管理</a><br />内容:
但研究了一下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已经重启成功
</p><p>
<a href="index.php?action=login&amp;hash=">立即登陆发表评论</a><br />
</p>
<p><a href="index.php?action=list&amp;hash=">返回日志列表</a><br /><a href="index.php?action=index&amp;hash=">返回主页</a></p>
</card>
</wml>
