title: Disable redirect to https - Nginx
body: <p>My current configuration for <code>Nginx</code> is </p>
  
  <pre><code>server {
      listen 80 default_server;
      listen [::]:80 default_server ipv6only=on;
  
      root /usr/share/nginx/html;
      index index.html index.html;
  
      server_name url.tdl;
  
  
     location / {
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header Host $http_host;
      proxy_pass http://localhost:2368;
      }
  }
  
  server {
      listen 443 ssl;
      server_name url.tdl; # Replace with your domain
  
      root /usr/share/nginx/html;
      index index.html index.htm;
  
      ssl on;
      ssl_certificate /root/url.tdl.chained.crt;
      ssl_certificate_key /url.tdl.me.key;
  
      client_max_body_size 10G;
  
          location / {
          proxy_pass http://localhost:2368;
          proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
          proxy_set_header Host $http_host;
          proxy_set_header X-Forwarded-Proto $scheme;
          proxy_buffering off;
      } 
  } 
  </code></pre>
  
  <p>In the above configuration file, I have no redirects written, but still the website redirects to HTTPS.</p>
  
  <p>According to <a href="https://stackoverflow.com/questions/30072777/nginx-disable-http-to-https-redirect">nginx - Disable http to https redirect?</a>, they have disabled <code>listen 443</code> but I want to have the <code>443</code> as an option.</p>
  
  <p>Is there any way to keep both options?</p>