title: django + nginx https redirect shows (414 Request-URI Too Large)
body: <p>I am trying to solve nginx redirect to https but when I use www.ozkandurakoglu.com I am getting 414 Request-URI Too Large error. Here is my settings for nginx:</p>
  
  <pre><code>upstream ozkan_server {
    server unix:/home/ytsejam/public_html/ozkansimple/run/gunicorn.sock fail_timeout=10s;
  }
  
  server {
      listen   80;
      server_name ozkandurakoglu.com www.ozkandurakoglu.com;
      return 301 $scheme:https://ozkandurakoglu.com$request_uri;
  }
  server {
    listen 443 ssl;
    listen [::]:443 ssl;
    ssl on;
    ssl_certificate /etc/letsencrypt/live/ozkandurakoglu.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/ozkandurakoglu.com/privkey.pem;
    ssl_trusted_certificate /etc/letsencrypt/live/ozkandurakoglu.com/chain.pem;
    ssl_session_timeout 1d;
    ssl_session_cache shared:SSL:50m;
    ssl_session_tickets off;
    ssl_prefer_server_ciphers on;
    add_header Strict-Transport-Security max-age=15768000;
    ssl_stapling on;
    ssl_stapling_verify on;
    server_name www.ozkandurakoglu.com;
    return 301 $scheme:https://ozkandurakoglu.com$request_uri;
  }
  server {
    listen 443 ssl;
    listen [::]:443 ssl;
    ssl on;
    ssl_certificate /etc/letsencrypt/live/ozkandurakoglu.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/ozkandurakoglu.com/privkey.pem;
    ssl_trusted_certificate /etc/letsencrypt/live/ozkandurakoglu.com/chain.pem;
    ssl_session_timeout 1d;
    ssl_session_cache shared:SSL:50m;
    ssl_session_tickets off;
    ssl_prefer_server_ciphers on;
    add_header Strict-Transport-Security max-age=15768000;
    ssl_stapling on;
    ssl_stapling_verify on;
    server_name  www.ozkandurakoglu.com ozkandurakoglu.com;
    client_max_body_size 4G;
    root /home/ytsejam/public_html/ozkansimple/;
    access_log /home/ytsejam/public_html/ozkansimple/logs/nginx-access.log;
    error_log /home/ytsejam/public_html/ozkansimple/logs/nginx-error.log warn;
    large_client_header_buffers 6 16k;
  ...
  }
  </code></pre>
  
  <p>can you help me ? </p>
  
  <p>Thanks</p>