title: How to restart nginx on OS X
body: <p>I'm using <code>nginx</code> on OS X 10.8. Freshly installed <code>nginx</code> but can't find a way to restart nginx except <code>kill nginx_pid</code> say <code>kill 64116</code>. Wondering if there are better ways to restart <code>nginx</code>.</p>
  
  <p>Found some methods on Google and SO but didn't work:</p>
  
  <pre><code>nginx -s restart
  
  sudo fuser -k 80/tcp ; sudo /etc/init.d/nginx restart
  </code></pre>
  
  <p>The error message for <code>nginx -s restart</code> is </p>
  
  <pre><code>nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory)
  </code></pre>
  
  <p>Sometimes also get this error msg:</p>
  
  <pre><code>nginx: invalid option: "-s restart"
  </code></pre>