title: Nginx reverse proxy configuration
body: <p>I need nginx to reverse- proxy GET and POST requests of the form:</p>
  
  <pre><code>/myapp/path/to/resource 
  </code></pre>
  
  <p>to:</p>
  
  <pre><code>http://127.0.0.1:9090/path/to/resource
  </code></pre>
  
  <p>I'm trying the following:</p>
  
  <pre><code>location /myapp/(.*) {
    rewrite $1;
    proxy_pass http://127.0.0.1:9090;
  }
  </code></pre>
  
  <p>but nginx is returning a HTTP 405 error [not allowed].</p>
  
  <p>Any ideas on how to fix this ? Thanks.</p>