title: nginx seems to cut off GET-params
body: <p>i have a problem with a qgis-system behind a nginx reverse-proxy.
  some requests will result in 404 when requested over nginx - without nginx the 404 errors do not happen.</p>
  
  <p>i will post some vital parts of the nginx-config:</p>
  
  <pre><code>log_format  main  '$host $remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" "$http_x_forwarded_for" $request_time $upstream_addr $upstream_http_status  "$upstream_addr$request_uri"';
  access_log /data/logs/nginx/access.log main buffer=4k;
  
  upstream backend-geodatenportal {
      ip_hash;
      zone http_backend 256k;
      server 172.28.136.21:80 weight=1 max_fails=3  fail_timeout=30s;
      keepalive 1024;
  }
  server {
  
      listen          geodatenportal.domain.tld:443 ssl;
      server_name     geodatenportal.domain.tld;
      ...
      location / {
          proxy_set_header X-Forwarded-Proto https;
          proxy_set_header Host $host;
          proxy_set_header ClientProtocol https;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_pass http://backend-main;
      }
  
      location ~/kommunalportal(.*)$ {
          proxy_set_header X-Forwarded-Proto https;
          proxy_set_header Host $host;
          proxy_set_header ClientProtocol https;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_pass http://backend-geodatenportal/kommunalportal$1;
      }
  </code></pre>
  
  <p>now the requests with problems:</p>
  
  <p>in nginx-log:</p>
  
  <p>geodatenportal.domain.tld - $IP - - [18/Sep/2019:09:59:54 +0200] "GET /kommunalportal/index.php/view/media/illustration?repository=kp&amp;project=m01_Klostermansfeld HTTP/2.0" 404 72 "<a href="https://geodatenportal.domain.tld/kommunalportal/index.php/view/" rel="nofollow noreferrer">https://geodatenportal.domain.tld/kommunalportal/index.php/view/</a>" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36" "-" 0.031 172.28.136.21:80 -  "<strong>172.28.136.21:80/kommunalportal/index.php/view/media/illustration?repository=kp&amp;project=m01_Klostermansfeld</strong>"</p>
  
  <p>with the log-configuration from top the bold string should be the request to the backend</p>
  
  <p>but this is what apache logs:</p>
  
  <p>194.113.79.210 - - [18/Sep/2019:09:59:54 +0200] "GET /kommunalportal/index.php/view/media/illustration HTTP/1.1" 404 72</p>
  
  <p>so it seems the GET-Parameters get lost on its way from nginx to apache</p>
  
  <p>can someone explain this?</p>