Have same question but with NGINX and find solution
Just add this section to existet SERVER block in your nginx site-avaliable file
And restart service. Works great.
P.S.
Ш believe there is same sort of solution for apache server
location /websocket {
proxy_pass
http://localhost:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}