title: "worker_processes" directive is not allowed nginx
body: <p>I need to create nginx.conf file with such routes: /assets - static files, /akka - for hello-world akka webapp, /* - default page. My default.conf file looks like this:</p>
  
  <pre><code>worker_processes  1;
  
  error_log  /var/log/nginx/error.log warn;
  pid        /var/run/nginx.pid;
  
  
  events {
      worker_connections  1024;
  }
  
  http {
      include mime.types;
      default_type  application/octet-stream;
  
      upstream hello-akka{
          server localhost:9000;
      }
  
      server {
          listen 80;
  
          location / {
          root   /usr/share/nginx/html;
          index  index.html index.htm;
          }
  
          location /akka {
          proxy_pass http://hello-akka;
          }
  
          location /assets {
          root /var/www;
          }   
      }
  }
  </code></pre>
  
  <p>Every time I restart nginx service I get these error messages:</p>
  
  <pre><code>nginx: [emerg] "worker_processes" directive is not allowed here in /etc/nginx/conf.d/default.conf:2
  nginx: configuration file /etc/nginx/nginx.conf test failed
  </code></pre>
  
  <p>I checked the structure of the file itself and I can't figure out what is wrong. Even when I delete this line I get the same "directive is not allowed" error but for other lines like pid, events and so on.
  So how can I fix such error?</p>