server {
    listen 80;
    listen 443 ssl;
    ssl_certificate vhost/aaa.com/ssl.crt;
    ssl_certificate_key vhost/aaa.com/ssl.key;

    server_name aaa.com;

    location /  {
        proxy_pass https://aaa.com:8081;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }

 }