server.modules += ( "mod_proxy", "mod_websocket" )

# Http Proxy
# 'http://host:port/ipython/' is redirect to Tornado: ipython notebook
#$HTTP["url"] =~ "(^\/ipython\/)" {
#  proxy.server  = ( "" => (( "host" => "127.0.0.1", "port" => 8888 )) )
#}

# 'http://host:port/socket.io/' is redirect to Node.js: socket.io
$HTTP["url"] =~ "^\/socket.io\/" {
  proxy.server  = ( "" => (( "host" => "127.0.0.1", "port" => 8081 )) )
}

websocket.server = (
	 "/websocket/" => ( "host" => "127.0.0.1",
					   "port" => 5303,
					   "proto" => "websocket" 
	)
)
websocket.ping_interval = 5 # send PING per 5 secs
websocket.timeout = 30      # disconnect a client when not to recv PONG for 30 secs
websocket.debug = 4         # LOG_DEBUG
