301方式

server {
    listen              443 ssl;
    server_name         www.aijxb.com aijxb.com;
    charset  utf-8;

    ssl_certificate     /ssl/51nca/xxx.pem;
    ssl_certificate_key /ssl/51nca/xxx.key;

    ssl_ciphers         HIGH:!aNULL:!MD5;
    ssl_protocols       TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;    
    ssl_prefer_server_ciphers on;
    ssl_session_timeout  5m;

    return 301 http://www.xxx.com; 
}

proxy_pass 方式

server {
    listen              443 ssl;
    server_name         www.aijxb.com aijxb.com;
    charset  utf-8;

    ssl_certificate     /ssl/51nca/xxx.pem;
    ssl_certificate_key /ssl/51nca/xxx.key;

    ssl_ciphers         HIGH:!aNULL:!MD5;
    ssl_protocols       TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;    
    ssl_prefer_server_ciphers on;
    ssl_session_timeout  5m;

    location / {        
            proxy_pass  http://www.xxx.com; 
    }

}