title: Restrict access for different users in nginx
body: <p>My requirement is I have two different users type one is admin users and another is normal users . Admin users can access all URL and normal users are only able to access one URL when they try to access others URL they getting access denied . </p>
  
  <p>Currently I able to set admin users rules , where admin users details are mentioned in .htpasswd and it's works fine . Below is configuration file .</p>
  
  <blockquote>
  <pre><code>    server {
      listen 8880;
  
      server_name test.com;
  
      auth_basic "Restricted Access";
      auth_basic_user_file /etc/nginx/htpasswd.users;
  
      location / {
          proxy_pass http://localhost:5601;
          proxy_http_version 1.1;
          proxy_set_header Upgrade $http_upgrade;
          proxy_set_header Connection 'upgrade';
          proxy_set_header Host $host;
          proxy_cache_bypass $http_upgrade;
      }
  }
  </code></pre>
  </blockquote>
  
  <p>Please help .</p>