sente

Apache websocket setup

Intro The need was to make sure that our apache was able to communicate with our Sente1 Apache config To the apacheconfig, under the :443 section (https) # Trying websockets here, c/o RewriteEngine On RewriteCond %{HTTP:Upgrade} =websocket [NC] RewriteRule /(.*) ws://127.0.0.1:8080/$1 [P,L] RewriteCond %{HTTP:Upgrade} !=websocket [NC] RewriteRule /(.*) http://127.0.0.1:8080/$1 [P,L] # END websockets Server shell, enabling the apache modules /sudo:root@devflats:/ $> a2enmod proxy_wstunnel # Considering dependency proxy for proxy_wstunnel: # Module proxy already enabled # Enabling module proxy_wstunnel.

Websockets for Clojure Sente in Apache Reverse Proxy

The Clojure library sente allows you to do smooth web-socket work in Clojure. In our case, we wanted the typical “Your Session Expires in N seconds” alert for users of the app. Sente was working smoothly on our local machines, but we were getting obscure errors in the console about 500 responses in our browser console. The Problem As mentioned, our console was showing server errors on the path that was supposed to be doing the Sente channels.