Using go-websocket behind Apache mod_proxy_wstunnel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear all,

I have encountered problem to make mod_proxy_wstunnel with my golang based websocket server. The server works fine without the reverse proxy, but it fails behind proxy.

My Apache config looks similar to this:

<VirtualHost *:80>
    DocumentRoot /var/www/foobar
    ServerName foobar.com
    ProxyPass / http://localhost:8080/
    ProxyPassReverse / http://localhost:8080/
    ProxyPass /ws/ ws://localhost:8080/ws/
    ProxyPassReverse /ws/ ws://localhost:8080/ws/
    ErrorLog logs/error_log-foobar
    CustomLog logs/access_log-foobar common
    LogLevel debug
</VirtualHost>

And of course I'm running the chat server on port 8080. I've tested it with SSH tunnel, and things work perfectly. Then I moved on to Apache.

The first time I tried, the _javascript_ console complains this:

NetworkError: 403 Forbidden - http://foobar.com/ws/

The request seems to be stucked at the origin check. Then I tried again after comment out the origin check, it get this:

NetworkError: 400 Bad Request - http://foobar.com/ws/

It seems the chat server do not get the upgrade request at all.

How should I debug this? Where should I start looking?


I've filed a question in StackOverflow:
http://stackoverflow.com/questions/18784658/using-go-websocket-behind-apache-mod-proxy-wstunnel

Please help by answering this mail or comment there.
Thanks!


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux