You are missing (in the latter example): RewriteEngine on
I also changed the last line a bit, and got it working with:
RewriteEngine on
RewriteCond %{HTTP:Connection} Upgrade [NC]
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteRule ^/?(.*) "ws://127.0.0.1:30000/$1" [P,L]
ProxyPass http://127.0.0.1:30000/ upgrade=websocket
No need to add upgrade=websocket
to ProxyPassReverse on the other hand.
References: