【Linux】nginx反代ESXi时控制台无法连接

参考的博文,这里根据我的具体情况做了删改,主要的原理就是增加对WebSocket的支持。

   location / {

        proxy_pass https://localhost:6660; #for esxi
        proxy_set_header Upgrade $http_upgrade;#for esxi
        proxy_set_header Connection upgrade;#for esxi
        
        proxy_set_header Host $host;
        proxy_redirect off;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        
        proxy_set_header X-Forwarded-Proto https; #for esxi
        proxy_set_header X-Nginx-Proxy true;# for esxi
        
    }