5.2.1. Setting up Apache front-end

Warning

You are looking at documentation for an older release. Not what you want? See the current release documentation.

Basic configuration for Apache

To allow Apache to act as a reverse proxy, you first need to activate some modules :

This can be acheived with the following command :

a2enmod proxy proxy_http proxy_wstunnel

Next, declare a new virtual host to access you eXo Platform instance :

Note

You can find more information on how to configure apache vhosts on here.

<VirtualHost *:80>

    ServerName my.server.name # <--- change here

    ServerAdmin my@server.name # <--- change here

    # don't loose time with IP address lookups
    HostnameLookups Off
    # needed for named virtual hosts
    UseCanonicalName Off
    # configures the footer on server-generated documents
    ServerSignature Off

    ProxyRequests           Off
    ProxyPreserveHost       On
    ProxyVia                On

    # Notifications via web socket, must be declared before the general ProxyPass definition
    <IfModule proxy_wstunnel_module>
        ProxyPass           /cometd    ws://127.0.0.1:8080/cometd max=100 acquire=5000 retry=5 disablereuse=on flushpackets=on # <--- change here and adapt the options to your load
    </IfModule>

    ProxyPass               /          http://127.0.0.1:8080/ acquire=1000 retry=30 max=100 # <--- change here and adapt the options to your load
    ProxyPassReverse        /          http://127.0.0.1:8080/  # <--- change here

    #####################
    # Log configuration
    #####################
    ErrorLog        ${APACHE_LOG_DIR}/my.server.name-error.log # <--- change here
    CustomLog       ${APACHE_LOG_DIR}/my.server.name-access.log log_with_durations # <--- change here

</VirtualHost>

Note

We are assuming the eXo Platform server is reachable at the ip 127.0.0.1 on port 8080. You have to adapt the configuration according to your installation.

Warning

Due to a bug in Apache Server prior version 2.4.13, an incorrect websocket configuration can impact the standard HTTP navigation. If you randomly have blank pages or portlet errors, please check the websocket tunnels are correctly working

This example use a log definition called log_with_durations. This is a customization of the default combined apache log format with the request durations. It's totally optional, if you don't want to override the log configuration, use the combined format You can add it to your Apache installation by adding the following content in your configuration :

LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\" %T" log_with_durations

Note

It is also recommanded to enable the apache status page to be able to monitor the apache behavior. More info are available here

See also

Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus