title: Nginx subdirectory on laravel using docker gives 404
body: <p>I have a nginx container which has a upstream to my laravel containers , with the below config file , I am trying to add a location named <code>cms</code> which should use my laravel upstream servers then. But now I'm getting 404 , file not found error . I have tried almost every solution on the internet but no achievement.</p>
  <p><strong>Nignx.conf</strong></p>
  <pre><code>            location ^~ /cms/ {
                  root /var/www/public;
                  try_files $uri $uri/ @cms;              
  
                  location ~ \.php$ {
                          fastcgi_split_path_info ^(.+?\.php)(/.*)$;
                          fastcgi_pass   redirect;
                          fastcgi_index index.php;
                          include fastcgi_params;
                          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                          fastcgi_param PATH_INFO $fastcgi_path_info;
          }
  }
   location @cms{
                         rewrite /cms/(.*)$ /cms/index.php?/$1 last;
                         #try_files $uri $uri/ /index.php?$query_string;
                  }
  </code></pre>
  <p><strong>PHP-FPM log</strong></p>
  <pre><code>172.10.9.91 -  17/Sep/2020:14:29:59 +0000 &quot;GET /cms/index.php&quot; 404
  
  172.10.9.91 -  17/Sep/2020:14:30:05 +0000 &quot;GET /cms/index.php&quot; 404
  
  172.10.9.91 -  17/Sep/2020:14:30:20 +0000 &quot;GET /cms/index.php&quot; 404
  
  172.10.9.91 -  17/Sep/2020:14:30:30 +0000 &quot;GET /cms/index.php&quot; 404
  </code></pre>
  <p>When I try to change the above config file by removing <code>/cms/index.php?/1$</code>, It seems Nginx does not use the upstream server and the code gives 404 on my current main domain.</p>