Skip to content

Instantly share code, notes, and snippets.

@twetzel
Created July 22, 2012 00:58
Show Gist options
  • Save twetzel/3157812 to your computer and use it in GitHub Desktop.
Save twetzel/3157812 to your computer and use it in GitHub Desktop.
private_pub/faye on nginx

private_pub / faye on nginx

I followed this tutorial by Johnathan Leppert and the instructions from nginx_tcp_proxy_module but changed nginx to use passenger and thin.

2 add the tcp part to nginx.conf:

tcp {
    upstream websockets {
        ## node processes
        server 12.34.56.78:9292; 
        check interval=300 rise=2 fall=5 timeout=1000;
    }   

    server {
        listen 9200;
        server_name domain.org;
        tcp_nodelay on;
        proxy_pass websockets;
    }
}

doesn´t work on port 80 for me

after that I still get empty responses from faye/privat_pub but there was an extremly trivial solution:

start privat_pub with:

RAILS_ENV=production bundle exec rackup private_pub.ru -s thin -E production

look private_pub - Issue #29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment