How to proxy novnc with nginx

languanghao

New Member
Feb 28, 2015
16
0
1
I found the configuration like below for proxy pve behind nginx, it works fine except novnc. When I open novnc window in chrome, it shows error:
WebSocket connection to 'wss://192.168.0.183/api2/json/nodes/host00/lxc/105/vncwebsocket?vncticket=PVEVNC%3A57…FF6CMMT6%2BFcsX4%2Bwr5GcF6RR8U3hx27hZXr9OZqi4vEkzRUxwAYiQg%3D%3D&port=5902' failed: Invalid frame header

Code:
server {
    listen 443;
    server_name _;
    ssl on;
    ssl_certificate /etc/nginx/ssl/cert.pem;
    ssl_certificate_key /etc/nginx/ssl/key.pem;
    proxy_redirect off;
    location / {
        proxy_pass https://proxmox:8006;
    }
}

Can anyone help me to solve the problem?