When you browse shell/console/vnc etc from your browser, it use websocket (wss) connection. So when you configure a reverse proxy to access your proxmox server then you must enable websocket support in your proxy server settings.
In my case I used apache reverse proxy.
First enable mod_proxy_wstunnel by command:
Bash:
sudo a2enmod proxy_wstunnel
sudo systemctl restart apache2
Apache ssl config:
ServerName ****.com
ServerAlias www.****.com
DirectoryIndex index.php index.htm index.html
<Directory /home/******/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch
Require all granted
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
AddType text/plain .php
</Directory>
<Directory /home/****/cgi-bin>
Require all granted
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
</Directory>
ProxyPass /.well-known !
RewriteEngine on
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProxyCheckPeerExpire off
ProxyPass /
https://192.168.10.80:8006/
ProxyPassReverse /
https://192.168.10.80:8006/
SSLProxyEngine on
SSLEngine on
SSLCertificateFile /home/*********/ssl.combined
SSLCertificateKeyFile /home/********/ssl.key
SSLCACertificateFile /home/*******/ssl.ca
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteRule /(.*) wss://192.168.10.80:8006/$1 [P]