Redirect HTTP to HTTPS in NGINX
Change nginx configuration file as below
server {
listen 80 default_server;
server_name www.bianxi.com;
return 301 https://$host$request_uri;
}
Note: Use default_server
for only one server for each port.