Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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!

share|improve this question
2  
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

3 Answers 3

up vote 21 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
1  
@hobbes3 stackoverflow.com/questions/6152659/… –  cbednarski Mar 16 '13 at 2:12

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!

share|improve this answer
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

 
discard

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.