I am trying to configure private pub on my server on an ip, same configuration was working earlier on different server , but not working on current.
config/private_pub.yml
development:
server: "http://52.76.xx.xx:9292/faye"
#server: "http://faye.myserver.com/faye"
secret_token: "secret"
test:
server: "http://localhost:9292/faye"
secret_token: "secret"
production:
server: "http://example.com/faye"
private_pub.ru
# Run with: rackup private_pub.ru -s thin -E production
require "bundler/setup"
require "yaml"
require "faye"
require "private_pub"
Faye::WebSocket.load_adapter('thin')
PrivatePub.load_config(File.expand_path("../config/private_pub.yml", __FILE__), ENV["RAILS_ENV"] || "development")
run PrivatePub.faye_app
When I run rackup private_pub.ru -s thin -E production
I get below
Thin web server (v1.6.4 codename Gob Bluth)
Maximum connections set to 1024
Listening on localhost:9292, CTRL+C to stop
But when I try to curl or call in browser, I get
Connection refused - connect(2) for "52.76.xx.xx" port 9292
I also tried with separate domain pointing to same IP for faye server and proxy it to localhost:9292
as below
server {
listen 80;
server_name faye.myserver.com www.faye.myserver.com;
# passenger_enabled on;
location / {
proxy_pass http://localhost:9292;
}
# passenger_app_env production;
}
But that also didn't work. Can you please tell me how to resolve the issue?