How to restart Nginx on Mac OS X?
I just installed Nginx on Mac OS X (thanks http://www.kevinworthington.com/nginx-mac-os-snow-leopard-2-minutes/), but how do I restart Nginx on Mac OS X?
Thanks!
Solution 1:
sudo nginx -s stop && sudo nginx
Solution 2:
For a one-liner, you could just do:
sudo nginx -s reload
The -s
options stands for signal, and is the option you'll use to send stop
, quit
, reopen
and reload
signals to nginx.
For more info on the options, just do nginx -h
for a list of all of them and their functions.
Cheers!
Solution 3:
for brew installation: sudo brew services restart nginx