title: nginx: [emerg] "server" directive is not allowed here in /etc/nginx/nginx.conf
body: <p>Sorry, but no matter what I try, there are always error messages?</p>
  
  <p>I have no idea, what is wrong with my file?</p>
  
  <p>---nginx.conf---</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>#user  nginx;
  worker_processes  1;
  
  #error_log  /var/log/nginx/error.log;
  #error_log  /var/log/nginx/error.log  notice;
  #error_log  /var/log/nginx/error.log  info;
  
  #pid        /var/run/nginx.pid;
  
  include /etc/nginx/modules.conf.d/*.conf;
  
  events {
  
      worker_connections 1024;
  
  }
  
  location / {
  
          client_max_body_size 2024M;
  }
  
  http {
  
      include       mime.types;
      default_type  application/octet-stream;
   client_max_body_size 2024M;
  
      #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
      #                  '$status $body_bytes_sent "$http_referer" '
      #                  '"$http_user_agent" "$http_x_forwarded_for"';
  
      #access_log  /var/log/nginx/access.log  main;
  
      sendfile        on;
      #tcp_nopush     on;
  
      #keepalive_timeout  0;
      keepalive_timeout  65;
      #tcp_nodelay        on;
  
      #gzip  on;
      #gzip_disable "MSIE [1-6]\.(?!.*SV1)";
  
      server_tokens off;
  
      include /etc/nginx/conf.d/*.conf;
   
   server {
  
         client_max_body_size 2024M;
      }
  }
  
  # override global parameters e.g. worker_rlimit_nofile
  include /etc/nginx/*global_params;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Who can help me so I understand where my mistake is?</p>
  
  <p>I'm trying "client_max_body_size 2024M;" to integrate (html / server / location).</p>
  
  <p>Thank you all!</p>