Hello, as I have spent a lot of time last week fighting nginx in order to make it render the NoVNC websocket correctly without any success, I saw there are multiple messages from many members indicating that it doesn't really work right now, not even this configuration.
I've managed to make it with Apache/2.4.25 and pasting a working configuration so anyone can use it.
Replace 10.1.1.1 with your Proxmox 5.1 node IP address.
I've managed to make it with Apache/2.4.25 and pasting a working configuration so anyone can use it.
Replace 10.1.1.1 with your Proxmox 5.1 node IP address.
Code:
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerAdmin admin@dummy.com
ServerName dummy.com
SSLEngine on
SSLCertificateFile /etc/nginx/ssl/yourcert.crt
SSLCertificateKeyFile /etc/nginx/ssl/yourcert.key
SSLProxyEngine on
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
ProxyRequests off
ProxyPreserveHost on
<Location />
ProxyPass https://10.1.1.1:8006/
ProxyPassReverse https://10.1.1.1:8006/
</Location>
<LocationMatch ^/(api2/json/nodes/[^\/]+/[^\/]+/[^\/]+/vncwebsocket.*)$>
ProxyPass wss://10.1.1.1:8006/$1 retry=0
</LocationMatch>
<Location /websockify>
ProxyPass ws://10.1.1.1:8006
ProxyPassReverse ws://10.1.1.1:8006
</Location>
</VirtualHost>
</IfModule>