2011年2月26日星期六

Re: nginx doesn't recognize command

Hello!

On Sun, Feb 27, 2011 at 12:26:47AM +0000, Aditya Herlambang wrote:

>
> I was following the tutorial here:
> http://articles.slicehost.com/2009/2/2/centos-installing-nginx-from-source
> and I tried to stop nginx by executing:
> sudo nginx stop at the directory
> and it says:
> invalid option "stop"
> why is it not recognizing the option??

Because there is no such option. If you see somebody running
"nginx stop" - he probably refer to his operating system startup
script instead, not nginx itself.

To stop nginx you have to sent SIGTERM to master process (or
SIGQUIT for graceful shutdown), i.e.

# kill -s TERM `cat /path/to/nginx.pid`

should work. Alternatively in 0.7.53+ you may use

# nginx -s stop

but this isn't really recommended unless you are under Windows and
has no other options (as this implies config parsing and may not
work at all e.g. if you have errors in your config).

See here for more details:

http://wiki.nginx.org/CommandLine

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx

没有评论:

发表评论