Integrate faye gem on server with nginx
I was getting follwing error on server.
ActionView::Template::Error (Failed to open TCP connection to localhost:9292 (Connection refused - connect(2) for "localhost" port 9292))
It can be fixed by following options:
sudo nano /etc/nginx/sites-available/default
location /faye {
proxy_pass http://localhost:9292;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_set_header X-Forwarded-Proto https;
break;
}
rackup private_pub.ru -s thin -E production -D
ActionView::Template::Error (Failed to open TCP connection to localhost:9292 (Connection refused - connect(2) for "localhost" port 9292))
It can be fixed by following options:
sudo nano /etc/nginx/sites-available/default
location /faye {
proxy_pass http://localhost:9292;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_set_header X-Forwarded-Proto https;
break;
}
rackup private_pub.ru -s thin -E production -D
Comments
Post a Comment