Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1854

how to redirect http to https in nginx, my default port is 81 on nginx

$
0
0

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


Viewing all articles
Browse latest Browse all 1854

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>