title: nginx certbot doesnt redirect to django server
body: <p>Im trying to set-up SSL sertificate for Django. I set up it by this guide: <a href="https://www.youtube.com/watch?v=dYdv6pkCufk&amp;ab_channel=TonyTeachesTech" rel="nofollow noreferrer">https://www.youtube.com/watch?v=dYdv6pkCufk&amp;ab_channel=TonyTeachesTech</a>, in the guide django server just start working with SSL, but for me is not working, but rederecting domain from http to https, but not redirecting to django server. I dont even know what to do. I search in entire internet and find nothing.</p>
  <p>This is my nginx config:</p>
  <pre><code>server {
      listen 80 default_server;
  
      server_name _;
  
      return 301 https://$host$request_uri;
  }
  server {
      server_name wavera.ru www.wavera.ru; # managed by Certbot
  
      return 301 https://$host$request_uri;
  
  
      listen 443 ssl; # managed by Certbot
      ssl_certificate /etc/letsencrypt/live/www.wavera.ru/fullchain.pem; # managed by Certbot
      ssl_certificate_key /etc/letsencrypt/live/www.wavera.ru/privkey.pem; # managed by Certbot
      include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
      ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  
  
  
  }server {
      if ($host = wavera.ru) {
          return 301 https://$host$request_uri;
      } # managed by Certbot
  
  
      if ($host = www.wavera.ru) {
          return 301 https://$host$request_uri;
      } # managed by Certbot
  
  
      listen 80 ;
      server_name wavera.ru www.wavera.ru;
      return 404; # managed by Certbot
  
  
  
  
  }
  
  
  </code></pre>
  <p>i starting server by</p>
  <pre><code>python3 manage.py runserver 
  </code></pre>