Skip to content

Instantly share code, notes, and snippets.

@yorkie
Created June 8, 2013 12:06
Show Gist options
  • Save yorkie/5734962 to your computer and use it in GitHub Desktop.
Save yorkie/5734962 to your computer and use it in GitHub Desktop.

Start nginx

$ sudo /usr/local/nginx/sbin/nginx

Stop

$ sudo /usr/local/nginx/sbin/nginx -s stop

Options

  • -c <path/to/conf> Specify which configuration file Nginx should use instead of the default.
  • -g Set global directives. (version >=0.7.4)
  • -t Don't run, just test the configuration file. nginx checks configuration for correct syntax and then try to open files referred in configuration.
  • -s signal Send signal to a master process: stop, quit, reopen, reload. (version >= 0.7.53)
  • -v Print version.
  • -V Print nginx version, compiler version and configure parameters.
  • -p prefix Set prefix path (default: /usr/local/nginx/). (version >= 0.7.53)
  • -h,-? Print help.

More details on NginxCommandLine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment