Hi appeantly Nginx cant work with the HTTP 1.1 request and I searched for a while and found that there are two solution exists first is to use Nginx with Tcp proxy module or using HAProxy which support websocket proxy over normal http as they said.
First I tried tcp proxy module but I suppose I couldnt configure it right ( here source of module https://github.com/yaoweibin/nginx_tcp_proxy_module ). Compiled from source, added tcp proxy module patch, changed nginx.conf according to my needs but I couldnt made virtual host config to work I guess.
My nginx reside in
/usr/local/nginx/
and configuration at
/usr/local/nginx/conf/nginx.conf
Suppose my application host on "mysite.com" here is my nginx.conf file is like this https://gist.github.com/1426598
My websocket reside in "mysite.com:different_port/chatsocket" path so I think I need to configure my virtual host file similar to in this post http://www.letseehere.com/reverse-proxy-web-sockets so that my websocket connection stay open and work on nginx proxy.
If you show some configuration for it or a way that would be great.