LP#1711194 osrf_config --diagnostic reports max-children
[opensrf-equinox.git] / README
diff --git a/README b/README
index 564093a..33476a0 100644 (file)
--- a/README
+++ b/README
@@ -11,7 +11,7 @@ follows:
     ** The *user* Linux account is the account that you use to log onto the
        Linux system as a regular user.
     ** The *root* Linux account is an account that has system administrator
-       privileges. On Debian and Fedora you can switch to this account from
+       privileges. On Debian you can switch to this account from
        your *user* account by issuing the `su -` command and entering the
        password for the *root* account when prompted. On Ubuntu you can switch
        to this account from your *user* account using the `sudo su -` command
@@ -68,7 +68,6 @@ Well-tested values for <osname> include:
   * `debian-wheezy` for Debian 7.0
   * `ubuntu-trusty` for Ubuntu 14.04
   * `ubuntu-xenial` for Ubuntu 16.04
-  * `fedora` for Fedora 17 and later
 
 Patches and suggestions for improvement from users of these distributions,
 or others, are welcome!
@@ -123,6 +122,11 @@ By default, OpenSRF includes C, Perl, and JavaScript support.
 You can add the `--enable-python` option to the configure command
 to build Python support and `--enable-java` for Java support.
 
+If you are planning on proxying WebSockets traffic (see below), you
+can add `--with-websockets-port=443` to specify that WebSockets traffic
+will be going through port 443. Without that option, the default port
+is 7682.
+
 Installation instructions
 -------------------------
 
@@ -177,7 +181,7 @@ Adjust the system dynamic library path
 Add `<PREFIX>/lib/` to the system's dynamic library path, and then run
 `ldconfig` as the *root* Linux account.
 
-On Debian, Ubuntu, and Fedora systems, run the following commands as the *root*
+On Debian and Ubuntu systems, run the following commands as the *root*
 Linux account:
 
 .Adjusting the system dynamic library path
@@ -208,7 +212,7 @@ work for OpenSRF.
 /etc/init.d/ejabberd stop
 ---------------------------------------------------------------------------
 +
-.(Fedora / Ubuntu Xenial) Stopping ejabberd
+.(Ubuntu Xenial) Stopping ejabberd
 [source, bash]
 ---------------------------------------------------------------------------
 systemctl stop ejabberd.service
@@ -286,7 +290,7 @@ hosts:
 /etc/init.d/ejabberd start
 ---------------------------------------------------------------------------
 +
-.(Fedora / Ubuntu Xenial) Starting ejabberd
+.(Ubuntu Xenial) Starting ejabberd
 [source, bash]
 ---------------------------------------------------------------------------
 systemctl start ejabberd.service
@@ -439,13 +443,13 @@ apxs2 -i -a -c mod_websocket.c
 3. Create the websocket Apache instance (more information about this in 
    `/usr/share/doc/apache2/README.multiple-instances`)
 +
-.(Debian)
+.(Debian Wheezy)
 [source, bash]
 ---------------------------------------------------------------------------
 sh /usr/share/doc/apache2.2-common/examples/setup-instance websockets
 ---------------------------------------------------------------------------
 +
-.(Ubuntu Trusty / Xenial)
+.(Debian Jessie / Ubuntu Trusty / Xenial)
 [source, bash]
 ---------------------------------------------------------------------------
 sh /usr/share/doc/apache2/examples/setup-instance websockets
@@ -461,14 +465,14 @@ a2dismod websocket
 5. Change to the directory into which you unpacked OpenSRF, then copy into
    place the config files
 +
-.(Debian)
+.(Debian Wheezy)
 [source, bash]
 ---------------------------------------------------------------------------
 cd /path/to/opensrf-OSRFVERSION
 cp examples/apache2/websockets/apache2.conf /etc/apache2-websockets/
 ---------------------------------------------------------------------------
 +
-.(Ubuntu Trusty / Xenial)
+.(Debian Jessie / Ubuntu Trusty / Xenial)
 [source, bash]
 ---------------------------------------------------------------------------
 cd /path/to/opensrf-OSRFVERSION
@@ -525,27 +529,29 @@ memory-intensive TPAC pages).
 
 The following instructions are a guide for setting this up on Debian
 and Ubuntu systems, but expect general familiarity with various system
-administration and netwrok tasks.  The steps should be run as the *root*
+administration and network tasks.  The steps should be run as the *root*
 Linux account, and assume that you already followed the instructions
 for installing WebSockets support.
 
-1. Install NGINX if not already present:
+1. Configure the main Apache instance to listen on port 7080 for HTTP and
+   port 7443 for HTTPS and ensure that it is not listening on ports 80
+   and 443, then restart Apache.
++
+2. Install NGINX if not already present:
 +
 [source, bash]
 ---------------------------------------------------------------------------
 apt-get install nginx
 ---------------------------------------------------------------------------
 +
-2. Configure the main Apache instance to listen on port 7080 for HTTP and
-   port 7443 for HTTPS and ensure that it is not listening on ports 80
-   and 443, then restart Apache.
-3. Copy the example NGINX configuration file into place.
+3. Copy the example NGINX configuration file into place and remove default.
 +
 [source, bash]
 ---------------------------------------------------------------------------
 cd /path/to/opensrf-OSRFVERSION
 cp examples/nginx/osrf-ws-http-proxy /etc/nginx/sites-available/
 ln -s /etc/nginx/sites-available/osrf-ws-http-proxy /etc/nginx/sites-enabled/osrf-ws-http-proxy
+rm /etc/nginx/sites-enabled/default
 ---------------------------------------------------------------------------
 +
 4. Edit `/etc/nginx/sites-available/osrf-ws-http-proxy` to set the location
@@ -557,7 +563,8 @@ ln -s /etc/nginx/sites-available/osrf-ws-http-proxy /etc/nginx/sites-enabled/osr
 /etc/init.d/nginx start
 ---------------------------------------------------------------------------
 +
-6. Edit `<PREFIX>/javascript/opensrf_ws.js` and `<PREFIX>/javascript/opensrf_ws_shared.js`
+6. If you didn't run `configure` with the `--with-websockets-port=443` option,
+edit `<PREFIX>/javascript/opensrf_ws.js` and `<PREFIX>/javascript/opensrf_ws_shared.js`
    and change
 +
 [source, javascript]
@@ -572,6 +579,58 @@ to
 var WEBSOCKET_PORT_SSL = 443;
 ---------------------------------------------------------------------------
 
+Optional: Using HAProxy as a proxy
+----------------------------------
+HAProxy can also be used to proxy HTTP, HTTPS, and WebSockets traffic
+as an alternative to NGINX.
+
+The following instructions are a guide for setting this up on Debian
+and Ubuntu systems, but expect general familiarity with various system
+administration and network tasks.  The steps should be run as the *root*
+Linux account, and assume that you already followed the instructions
+for installing WebSockets support.
+
+1. Install HAProxy if not already present:
++
+[source, bash]
+---------------------------------------------------------------------------
+apt-get install haproxy
+---------------------------------------------------------------------------
++
+2. Configure the main Apache instance to listen on port 7080 for HTTP and
+   port 7443 for HTTPS and ensure that it is not listening on ports 80
+   and 443, then restart Apache.
+3. Append the example HAProxy to `haproxy.cfg`.
++
+[source, bash]
+---------------------------------------------------------------------------
+cd /path/to/opensrf-OSRFVERSION
+cat examples/haproxy/osrf-ws-http-proxy >> /etc/haproxy/haproxy.cfg
+---------------------------------------------------------------------------
++
+4. Edit `/etc/haproxy/haproxy.cfg` to set the location
+   of the PEM file containing the SSL certificate and private key.
+5. Start HAProxy.
++
+[source, bash]
+---------------------------------------------------------------------------
+/etc/init.d/haproxy start
+---------------------------------------------------------------------------
++
+6. Edit `<PREFIX>/javascript/opensrf_ws.js` and `<PREFIX>/javascript/opensrf_ws_shared.js`
+   and change
++
+[source, javascript]
+---------------------------------------------------------------------------
+var WEBSOCKET_PORT_SSL = 7682;
+---------------------------------------------------------------------------
++
+to
++
+[source, javascript]
+---------------------------------------------------------------------------
+var WEBSOCKET_PORT_SSL = 443;
+---------------------------------------------------------------------------
 
 Troubleshooting note for Python users
 -------------------------------------