2 Websockets installation instructions for Debian:
4 # TODO: Most of this can be scripted.
5 # TODO: Better handling of external dependencies (websocket_plugin.h).
9 # see also /usr/share/doc/apache2/README.multiple-instances
10 % sh /usr/share/doc/apache2.2-common/examples/setup-instance websockets
12 % cp examples/apache2/websockets.conf /etc/apache2-websockets/sites-available/
14 # activate the websockets configuration
15 % a2ensite-websockets websockets.conf
17 # deactivate the default site
18 % a2dissite-websockets default
20 # remove most of the mods with this shell script
22 MODS=$(apache2ctl-websockets -M | grep shared | grep -v 'Syntax OK' | sed 's/_module//g' | cut -d' ' -f2 | xargs);
24 if [ $mod = 'mime' -o $mod = 'ssl' -o $mod = 'websocket' ]; then
25 echo "* Leaving module $mod in place";
27 echo "* Disabling module $mod";
28 a2dismod-websockets $mod;
32 # follow the instructions for installing Apache mod_websockets at
33 # https://github.com/disconnect/apache-websocket
35 # copy the headers into place so OpenSRF can compile
36 % cp $LOCATION_OF_APACHE_WEBSOCKET_CHECKOUT/websocket_plugin.h src/gateway/
40 # remove the websocket module from the default OpenSRF Apache instance
41 % a2dismod osrf_websocket_translator
43 # optional: add these configuration variables to
44 # /etc/init.d/apache2-websockets/envvars and adjust as needed.
45 # export OSRF_WEBSOCKET_IDLE_TIMEOUT=60
46 # export OSRF_WEBSOCKET_IDLE_CHECK_INTERVAL=5
47 # export OSRF_WEBSOCKET_CONFIG_FILE=/openils/conf/opensrf_core.xml
48 # export OSRF_WEBSOCKET_CONFIG_CTXT=gateway
50 # IDLE_TIMEOUT specifies how long we will allow a client to stay connected
51 # while idle. A longer timeout means less network traffic (from fewer
52 # websocket CONNECT calls), but it also means more Apache processes are
53 # tied up doing nothing.
55 # IDLE_CHECK_INTERVAL specifies how often we wake to check the idle status
56 # of the connected client.
58 # Both specified in seconds
60 # CONFIG_FILE / CTXT are the standard opensrf core config options.
62 # After OpenSRF is up and running, fire up the secondary Apache instance
63 # errors will appear in /var/log/apache2-websockets/error.log
64 % /etc/init.d/apache2-websockets restart