Basically, yea, as far as I know none of the servers today proxy websockets correctly. lighttpd came close when I tried it, but it couldn't listen for websockets and http on the same port.
Two solutions: As from http://groups.google.com/group/wave-protocol/msg/7eea9d2a91898f20 , edit line 980 of "com/glines/socketio/socket.io.js" inside "third_party/runtime/socketio/socketio-core-0.1-SNAPSHOT.jar", to change transports: ['websocket', 'flashsocket', 'htmlfile', 'xhr-multipart', 'xhr-polling', 'jsonp-polling'] to transports: ['xhr-polling']". This disables all the Cool New Tech and forces WIAB to implement sockets via long polling. Firefox probably worked because it didn't claim support for websockets, and so it downgraded to long-polling. Solution two is arguably even hackier: Open port 9898 and make WIAB bind to the public interface (so http://yourpublicdomain:9898 works). Then replace line 275 in src/org/waveprotocol/box/webclient/client/WebClient.java from private native String getWebSocketBaseUrl(String moduleBase) /*-{return ((window.location.protocol == "https:") ? "wss" : "ws") + /:\/\/[^\/]+/.exec(moduleBase)[0] + "/";}-*/; to private native String getWebSocketBaseUrl(String moduleBase) /*-{return ((window.location.protocol == "https:") ? "wss" : "ws") + /:\/\/[^\/:]+/.exec(moduleBase)[0] + ":9898/";}-*/; Yea. This obviously doesn't isolate the WIAB server at _all_, but it does let you serve the http component via a regular server. Hope this helps! -Sohum On 8 March 2012 00:26, Cathy Taylor <[email protected]> wrote: > My experience with running it that way is websockets don't get proxied > through Apache. I haven't found a resolution and the workarounds I found > didn't work for me. Only Firefox worked when running it with Apache in front. > > -Cathy > > On Mar 7, 2012, at 8:54 AM, Ben Hegarty wrote: > >> Hi Guys, >> Recently I've been trying to set up a WIAB server behind an apache server >> by forwarding the wave.<mydomain>.com subdomain to the 9898 port in WIAB, >> it seems to be ok accept for the fact that when I log in I can't see new >> waves in the inbox and the welcome wave never loads.. >> >> The apache config I'm using is... >> <VirtualHost *:80> >> ServerAdmin [email protected] >> ServerName wave.greycells.eu >> ProxyPreserveHost On >> ProxyRequests Off >> >> # setup the proxy >> <Proxy *> >> Order allow,deny >> Allow from all >> </Proxy> >> ProxyPass / http://localhost:9898/ >> ProxyPassReverse / http://localhost:9898/ >> </VirtualHost> >> >> I was just wondering if anyone else has seen this problem or might know >> whats causes it.. >> Regards >> Ben >
