nginx: invalid option: "-s start"

Patrick Chkoreff pc at
Thu May 31 20:29:00 UTC 2018

helloData wrote on 05/31/2018 04:10 PM:
> Hi Patrick,
> Thanks. Actually, I meant "signal", by mistake I wrote "start". 
> I got the error "nginx: invalid option: "-s signal"

The problem is you shouldn't actually say "-s signal".  The word
"signal" in the man page is just a placeholder for one of the four
options stop, quit, reopen, reload.

Here are the valid commands:

sudo nginx

    # Start the server.  If it's already started you'll see
    # a bunch of "bind" errors.  If you want to restart you
    # should do a "-s quit" first.

sudo nginx -s stop

    # Stop the server quickly.  (Sends the SIGTERM signal.)

sudo nginx -s quit

    # Stop the server gracefully.  (Sends the SIGQUIT signal.)

sudo nginx -s reopen

    # Reopen the server's log files but don't do anything else.

sudo nginx -s reload

    # Reload the server's configuration file.
    # Use this when you make changes to the configuration, but don't
    # need to do a hard restart.  This will gracefully shut down old
    # worker processes that are using the old configuration.

-- Patrick

More information about the nginx mailing list