title: Why additional location in nginx conf returns 404 code?
body: <p>I have this configuration for my virtual host:</p>
  
  <pre><code>server {
      listen 80;
      root /var/www/home;
      access_log /var/www/home/access.log;
      error_log /var/www/home/error.log;
  
      index index.php index.html index.htm;
  
      server_name home;
  
      location / {
          try_files $uri $uri/ /index.php?$args; #if doesn't exist, send it to index.php
      }
  
      error_page 404 /404.html;
      error_page 500 502 503 504 /50x.html;
  
      location ~ \.php$ {
          try_files $uri =404;
          fastcgi_split_path_info ^(.+\.php)(/.+)$;
          fastcgi_pass unix:/run/php/php-fpm.sock;
  
          fastcgi_index index.php;
          include fastcgi_params;
          fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
          fastcgi_param PHP_VALUE "error_log=/var/www/home/php_errors.log";
      }
  
      location ~* /Admin {
          allow 127.0.0.1;
          deny all;
      }
  }
  </code></pre>
  
  <p>When I am trying to access page /Admin nginx returns 404 code with successful html content generated by php. When location with /Admin removed, everything goes well. </p>
  
  <p>How to get what is the problem with additional location ?</p>