How to pass all the Faye Server Requests Through Apache Web Server.
Actually I want hide the port (9292) from the outside world in the
following example, and I want to use WebSocket as a Faye Transport
medium.
require "faye"
faye_server = Faye::RackAdapter.new(:mount => "/faye", :timeout => 45)
faye_server.listen(9292)*
run faye_server*
Thanks James,Could you please refer any link that describes how to setup HAProxy as I am naive in this area.
I have a my Rails App server and I want to run Faye push notification Server at 9292 port and I want to expose Faye server to outside world through apache with port 80. So that end users feel that there is only one server is running through apache.
E.g.
My Rails App URL: http://MyRailsApp/
Faye server URL: http://MyRailsApp/Faye
There are two ways to achieve the same:
1. Run the Faye server at port 80, so no need to open the port 9292 in firewall.
2. Use some proxy to expose http://MyFayeServer:9292/ as http://MyFayeServer.
But I want to use Apache as a proxy server for Faye server because it is already running on my machine to host rails App. I don’t want use another proxy server only for Faye server.
Are you sure that you are getting server notification via web-socket calls (ws://FayeServerUrl) not via normal long polling call?As I know Apache doesn't support Web-socket as off now.I want to use web-socket if my browser supports it. :)