title: Nginx regex and wildcard for location
body: <p>I am stuck with one issue. I am trying to hit 
  <a href="http://localhost/api/hello/somename" rel="nofollow noreferrer">http://localhost/api/hello/somename</a></p>
  
  <p>Now somename could be anything sam or phil, </p>
  
  <p>now my config file of nginx is below.</p>
  
  <pre><code>server {
      listen 80 default_server;
      server_name _;
      location ~ ^/api/(.*)$ {
      proxy_pass       http://localhost:8081/api/hello/$1;
     }
  
  }
  </code></pre>
  
  <p>Where I am wrong ? Can you pls help me to fix. Actually on 8081 container is running.</p>