title: Nginx Error ("http" directive is not allowed here in /etc/nginx/sites-enabled/abc)
body: <p>I am geeting below error while starting Nginx service</p>
  <p>&quot;http&quot; directive is not allowed here in /etc/nginx/sites-enabled/abc:1</p>
  <p>Here is my abc config</p>
  <pre><code>worker_processes  1;
  error_log /usr/local/openresty/nginx/logs/lua.log debug;
  events {
    worker_connections 1024;
  }
  http {
    upstream kibana {
      server server1:30001;
      server server2:30001;
      keepalive 15;
    }
    server {
      listen 8882;
      location / {
          ssl_certificate /etc/pki/tls/certs/ELK-Stack.crt;
          ssl_certificate_key /etc/pki/tls/private/ELK-Stack.key;
          ssl_session_cache shared:SSL:10m;
          auth_basic &quot;Restricted Access&quot;;
          auth_basic_user_file /etc/nginx/htpasswd.users;
        proxy_pass http://kibana;
        proxy_redirect off;
        proxy_buffering off;
        proxy_http_version 1.1;
        proxy_set_header Connection &quot;Keep-Alive&quot;;
        proxy_set_header Proxy-Connection &quot;Keep-Alive&quot;;
      }
    }
  }
  </code></pre>
  <p>--&gt; FYI I am creating this file in /etc/nginx/sites-available and linking it to
  /etc/nginx/sites-enabled . I am providing a link using following command</p>
  <pre><code>sudo ln -s /etc/nginx/sites-available/abc /etc/nginx/sites-enabled/abc
  </code></pre>
  <p>After the above command I can see a link is been created in /etc/nginx/sites-enabled directory .</p>
  <p>Please suggest what I am doing wrong ?</p>
  <p>Regards,</p>