Search code examples
apachesinatrathinserver-sent-events

Will Apache + Thin + SSE work?


We use Apache as a proxy in front of all of our applications. Will using Apache in front of Thin as a proxy server work? I am hoping to do a chat type of application like the one delivered with Sinatra.


Solution

  • I've had success doing this with the below Apache config settings.

    ProxyPass /stream_event http://127.0.0.1:9292
    ProxyPassReverse /stream_event http://127.0.0.1:9292
    

    See this post for more details. Server Sent Event connection not staying open with Apache/Thin/Sinatra