Apache httpd

An Apache HTTP Server 2.x can be configured as web frontend of an Axon.ivy Engine. The communication between the Apache HTTP Server and the Tomcat from Axon.ivy is possible by using the Apache Tomcat Connector.

Windows configuration

  1. If your Apache HTTP Server is not running on the same host as the Axon.ivy Engine then the integration directory content must be copied to the host where your Apache HTTP Server is running. Copy the mod_jk binaries and the sample configuration files from the directory that matches your OS in [engineDir]/misc/apache to the Apache host under C:/Program Files/ivy. All next steps have to be done on the host where the Apache HTTP Server is running on.

  2. Include the copied jk_module configuration in the [[apache-dir]]/conf/httpd.conf. Add the following lines to do so:

    # Axon.ivy Engine Integration
    Include C:/Program Files/ivy/mod_jk.conf
    
  3. Replace all <path> strings in the file C:/Program Files/ivy/mod_jk.conf so that the file reflects your local paths:

    # Load mod_jk module
    LoadModule    jk_module  c:/program files/ivy/mod_jk-1.2.42-httpd-2.4.so
    # Where to find workers.properties
    JkWorkersFile c:/program files/ivy/workers.properties
    # Where to put jk shared memory
    JkShmFile     c:/program files/ivy/mod_jk.shm
    # Where to put jk logs
    JkLogFile     c:/program files/ivy/mod_jk.log
    # Set the jk log level [debug/error/info]
    JkLogLevel    info
    # Select the timestamp log format
    JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
    
    # Mount the uri "/ivy/*" to the worker AxonIvyEngine.
    JkMount  /ivy/* AxonIvyEngine
    
  4. If you have configured virtual hosts in your apache configuration you have to map the URI /ivy/* in all virtual host you want to integrate Axon.ivy Engine into. This can be done by copying the following line from the mod_jk.conf file to the appropriate virtual host definitions:

    JkMount /ivy/* AxonIvyEngine
    

    Copy this to the appropriate virtual host definitions, e.g.:

    <VirtualHost *:80>
      ServerAdmin webmaster@ivy.soreco.wan
      DocumentRoot "C:/Program Files (x86)/Apache Software Foundation/Apache2.2/docs/ivy.soreco.wan"
      ServerName ivy.soreco.wan
      ServerAlias www.ivy.soreco.wan
      ErrorLog "logs/ivy.soreco.wan-error.log"
      CustomLog "logs/ivy.soreco.wan-access.log" common
      JkMount /ivy/* AxonIvyEngine
    </VirtualHost>
    
  5. Define the hostname and port, where the Axon.ivy Engine is running. Adjust the content of the file C:/Program Files/ivy/worker.properties to do so.

    worker.list=AxonIvyEngine
    worker.AxonIvyEngine.type=ajp13 
    worker.AxonIvyEngine.port=8009
    worker.AxonIvyEngine.host=ivyserver
    
  6. Update the external base URL as shown in the ivy.webserver.yaml

  7. Restart the Apache HTTP Server and the Axon.ivy overview page should be accessible under http://apacheHostName/ivy

Linux configuration

Within this example an Apache HTTP Server is configured so that it can connect to the Tomcat of an Axon.ivy Engine. The configuration step descriptions are generic and can be used under any Linux distribution. But the concrete examples assume that an Ubuntu distribution is installed as Operating System.

  1. Install the latest Tomcat Connector (mod_JK) by console.

    sudo apt install apache2 libapache2-mod-jk
    
  2. Enable the new module

    sudo a2enmod jk
    
  3. Update the worker.properties file according to the examples in the [engineDir]/misc/apache/. The following example content would connect to an Axon.ivy Engine on the host ivyserver under the default AJP port 8009. Modify the file /etc/libapache2-mod-jk/worker.properties as follows.

    worker.list=AxonIvyEngine
    worker.AxonIvyEngine.type=ajp13 
    worker.AxonIvyEngine.port=8009
    worker.AxonIvyEngine.host=ivyserver
    
  4. Mount the Axon.ivy Engine in the virtual host definition of the Apache HTTP Server. The context URI must match the context of the Axon.ivy Engine. Change the file /etc/apache2/sites-available/default as shown in this snippet.

    <VirtualHost *:80>
      ...
      #Mounts the URI /ivy/* to the worker AxonIvyEngine
      JkMount /ivy/* AxonIvyEngine
    </VirtualHost>
    

    Tip

    If the Apache HTTP Server is used as Load Balancer for a clustered Axon.ivy Engine installation, the JK Status Manager can be used to display debugging informations. The Manager is accessible when it is mounted in the virtual host definition configuration.

    <VirtualHost *:80> 
      ...
      #Mounts the URI /jkmanager/* to the JK Status Manager interface.
      JkMount /jkmanager/* jkstatus
    </VirtualHost>
    
  5. Update the external base URL as shown in the ivy.webserver.yaml

  6. Restart the Apache HTTP Server and the Axon.ivy overview page should be accessible under http://apacheHostName/ivy

Change context URI /ivy/

You might like to make the Axon.ivy engine accessible under a custom context URI other than /ivy.

  1. Change the context name of Axon.ivy as shown in the ivy.webserver.yaml

    # sample ivy.yaml that configures a different context:
    # so Axon.ivy will be accessible trough http://localhost/workflow
    WebServer.IvyContextName: workflow
    
  2. Change the context name of the Apache httpd server by changing the last line of the mod_jk.conf configuration file:

    #JkMount  /ivy/* AxonIvyEngine
    JkMount  /workflow/* AxonIvyEngine
    
  3. If you have a virtual host configuration, the JkMount command with the new context URI must also be applied to the virtual host definition:

    <VirtualHost *:80>
      ...
      JkMount /workflow/* AxonIvyEngine
    </VirtualHost>