Welcome! Log In Create A New Profile

Advanced

Re: nginx doesn't recognize command

Maxim Dounin
February 26, 2011 08:54PM
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
Subject Author Posted

nginx doesn't recognize command

equinox February 26, 2011 07:30PM

Re: nginx doesn't recognize command

Maxim Dounin February 26, 2011 08:54PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 91
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready