From 497c98337699752e3164d3ace73215f035c0cdf4 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 6 Mar 2014 15:47:36 -0500 Subject: [PATCH] LP#1268619: websockets : additional apache config docs Signed-off-by: Bill Erickson --- README.websockets | 30 +++++++++++++++-------- examples/apache2/websockets/ports.conf | 13 ++++++++++ examples/apache2/{ => websockets}/websockets.conf | 0 3 files changed, 33 insertions(+), 10 deletions(-) create mode 100644 examples/apache2/websockets/ports.conf rename examples/apache2/{ => websockets}/websockets.conf (100%) diff --git a/README.websockets b/README.websockets index 0b94fd3..45f336f 100644 --- a/README.websockets +++ b/README.websockets @@ -4,12 +4,18 @@ Websockets installation instructions for Debian: # TODO: Most of this can be scripted. # TODO: Better handling of external dependencies (websocket_plugin.h). -# as root +# ! as root ! +# Perform these steps before installing OpenSRF +# Be sure to restart the websocket instance after an opensrf re-install +# just like you would the main apache instance: +# % /etc/init.d/apache2-websockets restart # see also /usr/share/doc/apache2/README.multiple-instances % sh /usr/share/doc/apache2.2-common/examples/setup-instance websockets -% cp examples/apache2/websockets.conf /etc/apache2-websockets/sites-available/ +# update configs +% cp examples/apache2/websockets/websockets.conf /etc/apache2-websockets/sites-available/ +% cp examples/apache2/websockets/ports.conf /etc/apache2-websockets/ # activate the websockets configuration % a2ensite-websockets websockets.conf @@ -18,6 +24,8 @@ Websockets installation instructions for Debian: % a2dissite-websockets default # remove most of the mods with this shell script +# you may have to do this twice, depending on the order in which +# they are removed. (Some modules rely on other modules). MODS=$(apache2ctl-websockets -M | grep shared | grep -v 'Syntax OK' | sed 's/_module//g' | cut -d' ' -f2 | xargs); for mod in $MODS; do @@ -32,15 +40,18 @@ done # follow the instructions for installing Apache mod_websockets at # https://github.com/disconnect/apache-websocket -# copy the headers into place so OpenSRF can compile -% cp $LOCATION_OF_APACHE_WEBSOCKET_CHECKOUT/websocket_plugin.h src/gateway/ +# install the apache-websocket module +% cd tmp # or wherever +% git clone https://github.com/disconnect/apache-websocket +% cd apache-websocket +% apxs2 -i -a -c mod_websocket.c -# install OpenSRF +# remove from the main apache instance +% a2dismod websocket +# add to the websocket instance +% a2enmod-websockets websocket -# remove the websocket module from the default OpenSRF Apache instance -% a2dismod osrf_websocket_translator - -# optional: add these configuration variables to +# OPTIONAL: add these configuration variables to # /etc/init.d/apache2-websockets/envvars and adjust as needed. # export OSRF_WEBSOCKET_IDLE_TIMEOUT=60 # export OSRF_WEBSOCKET_IDLE_CHECK_INTERVAL=5 @@ -61,6 +72,5 @@ done # After OpenSRF is up and running, fire up the secondary Apache instance # errors will appear in /var/log/apache2-websockets/error.log -% /etc/init.d/apache2-websockets restart diff --git a/examples/apache2/websockets/ports.conf b/examples/apache2/websockets/ports.conf new file mode 100644 index 0000000..aaa4dd5 --- /dev/null +++ b/examples/apache2/websockets/ports.conf @@ -0,0 +1,13 @@ +# non-SSL websocket connections + +Listen 7680 + +# SSL websocket connections + + + Listen 7682 + + + + Listen 7682 + diff --git a/examples/apache2/websockets.conf b/examples/apache2/websockets/websockets.conf similarity index 100% rename from examples/apache2/websockets.conf rename to examples/apache2/websockets/websockets.conf -- 2.11.0