ISPConfig: snippet per reverse proxy con socket.io

Qualche settimana fa stavo uscendo pazzo per un problema alla UI di una web app dietro reverse proxy, mi sono accorto che era un problema sul reverse proxy ispezionando la pagina con le WebTools di Chrome e notando che alcune richieste non andavano a buon fine: tutte quelle di socket.io.

ISPconfig -> Siti -> [vhost sito] -> Opzioni -> Direttive Apache

ProxyRequests Off
ProxyPreserveHost On
ProxyPass /.well-known/ !
ProxyPass /               http://10.8.10.11/
ProxyPassReverse /  http://10.8.10.11/

ProxyVia on      
RewriteEngine On

RewriteEngine On
RewriteCond %{HTTP:Connection} Upgrade [NC]
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteRule /(.*) ws://10.8.10.11:8080/$1 [P,L]

ProxyPass               /socket.io http://10.8.10.11:8080/socket.io
ProxyPassReverse        /socket.io http://10.8.10.11/socket.io