title: nginx directive is not allowed here in unicorn's example nginx.conf
body: <p>I'm using nginx 1.4.1. After copying <a href="https://github.com/defunkt/unicorn/blob/master/examples/nginx.conf" rel="nofollow noreferrer">unicorn's example of <code>nginx.conf</code></a>, I found out the settings must be moved to different directives. I still couldn't manage to place the following settings in the <code>nginx.conf</code> file: <code>worker_processes</code>, <code>user</code>, <code>pid</code> and <code>events</code> block. When I place them as it is now, the log shows <code>directive is not allowed here</code>. What should I fix?</p>
  
  <pre><code>worker_processes 1;
  user deployer sudo; # for systems with a "nogroup"
  pid /run/nginx.pid;
  
  events {
    worker_connections 1024; # increase if you have lots of clients
    accept_mutex off; # "on" if nginx worker_processes &gt; 1
  }
  
  upstream abc {
    ...
  }
  
  server {
    ...
  }
  </code></pre>
  
  <h1>Update 1</h1>
  
  <p>I know about this <a href="https://stackoverflow.com/questions/15208135/nginx-configuration-error">post</a>, but it's weird that whatever I am doing is not working. I couldn't find any docs in nginx.</p>