For a more complete description on how to build the Apache 2 module and Filter see Installing the Filter. |
The dist package of mod_unblufilter
provides a config directory containing a number of example configurations for various platforms.
The following example is self-contained. That is: With this configuration, all Apache 2 configurations required to run Unblu via this Apache server are included. In particular, this includes configuration of a reverse proxy path for /unblu requests, adding mod_unblufilter
using the mod_filter Apache 2 module and the mod_unblufilter
configuration itself.
Example Configuration
############################################################ # Configure reverse proxy to /unblu of collaboration server <IfModule !mod_proxy.c> LoadModule proxy_module modules/mod_proxy.so <IfModule !mod_proxy_http.c> LoadModule proxy_http_module modules/mod_proxy_http.so </IfModule> </IfModule> ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass /unblu/ http://unbluserver/unblu/ ProxyPassReverse /unblu/ http://unbluserver/unblu/ ############################################################# # ConfigureUnblu LoadModule unblufilter_module modules/mod_unblufilter.so UnbluModule On UnbluServerUrl http://unbluserver/ UnbluConfigOrigin local UnbluConfigDirectory /path/to/your/unblu.conf UnbluApiKey yourUnbluAPIKeygoeshere # Set the following setting to 4 for compatibility with Unblu 4.x. Set it to 5 # for compatibility with Unblu 5 and later UnbluCompatMode 5 ############################################################# # Advanced Unblu Configuration # the following settings are defaults - uncomment and adapt them #UnbluPublicPathPrefix /unblu #UnbluSystemPathPrefix /sys-unblu #UnbluServerAdminBackend rest/filterBackend #UnbluDefaultCharset ISO-8859-1 #UnbluConfigOrigin local #UnbluConfigDirectory /etc/httpd/unblu/unblu.conf #UnbluConfigExpiration 3600 #UnbluMaxResponseSizeResource 100kb #UnbluMaxResponseSizeInjection 10kb ############################################################# # Add the filter module to the filter chain <IfModule !mod_filter.c> LoadModule filter_module modules/mod_filter.so </IfModule> # The following lines require filter_module to be active # See http://httpd.apache.org/docs/2.4/mod/mod_filter.html # for details about filters # FilterProvider Syntax: # FilterProvider filter-name provider-name expression # NOTE: do not change the provider-name (unblufilter) - it is hardcoded # and connects this configuration to the filter module FilterProvider chatfilter unblufilter "%{CONTENT_TYPE}=~ /.*/" # FilterChain Syntax: # FilterChain [+=-@!]filter-name ... # NOTE: The @ before the filter-name ensures that the filter is inserted at the # first position FilterChain @chatfilter #############################################################
Configuration Parameter Description
Reverse proxy server
The following settings are generic and usually need no adaptation:
-
IfModule !mod_proxy.c: loads mod_proxy if not loaded already
-
IfModule !mod_proxy_http.c: loads mod_proxy_http if not loaded already
-
ProxyRequests: configure this as a reverse proxy (thus set to "no" to disable forward proxy capabilities).
-
Proxy section: configure access control to proxy (allow all).
The following two lines require adaptation: unbluserver
must be replaced with the hostname plus port (if non-standard) of the backend collaboration server.
-
ProxyPass: configure
/unblu
requests to be proxied. -
ProxyPassReverse: Make sure response headers are adapted to have a transparent reverse proxy Unblu configuration.
The following settings are required and must be adapted accordingly:
-
LoadModule: load
mod_unblufilter
-
UnbluServerUrl: hostname and path of the backend Collaboration Server or a proxy, where the server can be reached.
The following settings are commented out (in the provided example configuration) because they represent default values:
-
UnbluPublicPathPrefix: Must have a leading slash and otherwise match the setting of com.unblu.identifier.publicPathPrefix in the Unblu Server (
unblu
by default). -
UnbluSystemPathPrefix: Must have a leading slash and otherwise match the setting of com.unblu.identifier.systemPathPrefix in the Unblu Server (
sys-unblu
by default). -
UnbluServerAdminBackend: The URL of the admin backend to be used by the Apache 2 filter. Typically fixed to the default rest/filterBackend (unlikely to change).
-
UnbluConfigOrigin: Can be either local or remote (default).
If local, the configuration file must be located at UnbluConfigDirectory (UnbluConfigDirectory is the path and filename in this case).
UnbluConfigExpiration is ignored when local is selected. |
If remote, the configuration file will be downloaded from the remote Collaboration Server and stored in the directory given by UnbluConfigDirectory (which must be writable and readable in this case).
-
UnbluDefaultCharset: Character set used if none is specified in an HTTP (text) response.
-
UnbluConfigDirectory: If UnbluConfigOrigin is set to remote, this is not required. If UnbluConfigOrigin is set to local, this must specify the path and filename of the configuration file.
-
UnbluConfigExpiration: Time, in seconds, until the downloaded configuration of the Unblu Server expires and must be re-downloaded. Ignored if UnbluConfigOrigin is set to local.
mod_filter configuration:
-
FilterProvider:
mod_filter
specific command to enablemod_unblufilter
as a filter in Apache 2 -
FilterChain: Specifies where in the filter chain Unblu is called. Unblu must be called before any URL transformations are performed (such as URL encryption or decryption).