IP 上のサーバーでプライベート パブを構成しようとしています。以前は同じ構成が別のサーバーで機能していましたが、現在は機能していません。
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
走るrackup private_pub.ru -s thin -E production
と下に落ちます
Thin web server (v1.6.4 codename Gob Bluth)
Maximum connections set to 1024
Listening on localhost:9292, CTRL+C to stop
しかし、ブラウザでカールしたり呼び出したりしようとすると、
Connection refused - connect(2) for "52.76.xx.xx" port 9292
また、fayeサーバーの同じIPを指す別のドメインを試し、localhost:9292
以下のようにプロキシしました
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;
}
しかし、それもうまくいきませんでした。問題の解決方法を教えてください。