title: IP allow subdirectory access NGINX
body: <p>im actually using nginx as my webserver im trying to deny all a subdirectory access  using this:</p>
  
  <pre><code>location / {
      root   /usr/share/nginx/html/project;
      index  index.html index.htm index.php;
  }
  
  
  
  location ~ ^/subdir/ { 
      allow 192.168.1.0/24; 
      deny all; 
      try_files $uri $uri/ /index_subdir.php?$query_string;
  }
  </code></pre>
  
  <p>but nginx try to find out index_subdir.php inside project folder.</p>
  
  <p>I hope you can give me a hand.</p>
  
  <p>Kind regards!!!</p>