Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just installed Nginx on Mac OS X (thanks, but how do I restart Nginx on Mac OS X?


share|improve this question
If you just want to restart because of an updated config then just do sudo nginx -s reload. – hobbes3 Mar 16 '13 at 21:26
up vote 44 down vote accepted
sudo nginx -s stop && sudo nginx
share|improve this answer
Quick question what does the && means? I guess it's something different then using ;? – hobbes3 Mar 15 '13 at 20:03
@hobbes3… – cbednarski Mar 16 '13 at 2:12
this answer is not working for brew installed nginx – vearutop Aug 9 '15 at 4:43

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.


share|improve this answer
This did not work for me so I had to actually do sudo nginx to get it to start. I think it had something to do with nginx already being stopped in my case. – jamescampbell May 19 at 17:40
sudo pkill nginx   
sudo nginx

If the pkill can't be found, then install it using brew install proctools first.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.