title: Nginx API configuration with unlimited parameters
body: <p>I'm trying to set up a quick temp API for a project i'm working on</p>
  
  <p>My current nginx conf :</p>
  
  <pre><code>listen 80;
  server_name app.domain.com
  
  root /var/www/html/public;
  index index.html index.php:
  
  rewrite ^/api/v1/([^/]+)/([^/]+)/?$ /apiv1.php?class=$1method=$2? last;
  
  location / {
       try_files $uri $uri/ /index.php;
  }
  
  + standard fpm config
  </code></pre>
  
  <p>While this works for urls like /api/v1/type/subtype , </p>
  
  <p>I need to be able to request to url in a format like this :</p>
  
  <p>/api/v1/organisation/{id}/teams</p>
  
  <p>/api/v1/organisations/{id}/teams/{id}</p>
  
  <p>How can I get an unlimited amount of possible parameters in my url?</p>