I am trying to redirect HTTP to HTTPS. My default port is 81 on nginx.
server { listen 81; server_name deveshvyas.in; return 307 https: //deveshvyas.in$request_uri;}server { listen[::]: 443 ssl http2; listen 443 ssl http2; # ssl_code server_name deveshvyas.in; ssl_certificate / etc / nginx / ssl / nginx.crt; ssl_certificate_key / etc / nginx / ssl / nginx.key; location / { proxy_pass http: //127.0.0.1:3000; }}https is working fine but fails in redirection