title: Nginx URL Encoding Issue
body: <p>I'm using Nginx in front of Apache and have an issue with URL encoding.</p>
  
  <p>Requests for :</p>
  
  <pre><code>GET /forum/index.php%3Ftopic%3D14454.3775%3Bwap2
  </code></pre>
  
  <p>Produces this error in Apache (when proxy_passed from Nginx) :</p>
  
  <pre><code>/forum/index.php?topic=14454.3775;wap2' not found or unable to stat
  </code></pre>
  
  <p>When I request the url above (not encoded) it gets processed just fine.</p>
  
  <p>The solution I found is I need to change:</p>
  
  <pre><code>proxy_pass         http://127.0.0.1:80;
  </code></pre>
  
  <p>to</p>
  
  <pre><code>proxy_pass         http://127.0.0.1:80/;
  </code></pre>
  
  <p>When the forward slash is excluded, the original request will not be decoded. When I add the forward slash, this is the error message I receive :</p>
  
  <pre><code>"proxy_pass" cannot have URI part in location given by regular expression, or inside named location, or inside "if" statement, or inside "limit_except" block
  </code></pre>
  
  <p>My nginx config block is :</p>
  
  <pre><code>location ~* ^/forum/index.php
  {
      charset ISO-8859-1;
      include /etc/nginx/proxypass.conf;
      proxy_pass http://127.0.0.1:80;
  }
  </code></pre>
  
  <p>How can I fix the proxy_pass directive and include the forward slash so the request url is decoded before it's passed over to Apache?</p>
  
  <p>EDIT:</p>
  
  <p>Request:</p>
  
  <pre><code>GET /index.php HTTP/1.1" 200 16481 "http://www.example.com/forum/index.php%3Ftopic%3D14454.3775%3Bwap2
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>script '/www/example.com/httpdocs/forum/index.php?topic=14454.3775;wap2' not found or unable to stat
  </code></pre>