Configuring Apache with JBoss

The following configuration steps apply to Windows/Linux/UNIX platforms.

Step 1: Run the Appeon setup program and install PowerServer Web Component to the document root of the Apache HTTP Server, for example, %Apache%\htdocs\.

If you have installed PowerServer Web Component to another location, then you should copy the entire appeon folder from the installation directory of PowerServer Web Component to the Apache document root.

Step 2: Download the required plug-ins from http://archive.apache.org/dist/jakarta/tomcat-connectors/jk/binaries.

Step 3: Copy the downloaded plug-ins to the <APACHE>\modules folder and rename it to mod_jk.so.

Step 4: Go to the <APACHE>\conf folder, open the httpd.conf file with a text editor, and add the following script to the end of this file.

##################################################################
#                      JBOSS Plug-In
##################################################################
# Include mod_jk configuration file
Include conf/mod_jk.conf

Step 5: In the <APACHE>\conf folder, create the workers.properties file and add the following scripts to it.

# Define Node1
worker.list=node1
# ajp13 port of JBoss server
worker.node1.port=8009
# IP of JBoss server
worker.node1.host=192.0.2.217
worker.node1.type=ajp13
worker.node1.lbfactor=1
#worker.node1.local_worker=1 (1)
worker.node1.cachesize=10

Step 6: In the <APACHE>\conf folder, create the redirector file mod_jk.conf and add the following scripts to it.

##################################################################
#                      JBOSS Plug-In
##################################################################
# Load mod_jk module
# Specify the filename of the mod_jk lib
LoadModule jk_module modules/mod_jk.so
# Where to find workers.properties
JkWorkersFile conf/workers.properties
# Where to put jk logs
JkLogFile logs/mod_jk.log
# Set the jk log level [debug/error/info]
JkLogLevel info 
# Select the log format
JkLogStampFormat  "[%a %b %d %H:%M:%S %Y]"
# JkOptions indicates to send SSK KEY SIZE
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
# JkRequestLogFormat
JkRequestLogFormat "%w %V %T"
#redirect
JkMount /AEM node1
JkMount /AEM/* node1
JkMount /servlet/* node1
JkMount /servlet node1
JkMount /reportfile/* node1
JkMount /reportfile node1
JkMount /imagefile/* node1
JkMount /imagefile node1
JkMount /dwfile/* node1
JkMount /dwfile node1
JkMount /ajsdown/* node1
JkMount /ajsdown node1

Step 7: Go to <JBossHome>\standalone\configuration\ (for example, C:\wildfly-10.0.0.Final\standalone\configuration\ or C:\applicationserver\jboss-eap-6.4\standalone\configuration), open the standalone.xml file with a text editor. Note that the scripts are different between JBoss EAP 6.4 and Wildfly 10.

For JBoss EAP 6.4, find the following line:

<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">

Add the following line under the above line:

<connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp"/>

For Wildfly 10, find the following line:

<http-listener name="default" socket-binding="http" redirect-socket="https" enable-http2="true"/>

Add the following line under the above line:

<ajp-listener name="ajp-default" socket-binding="ajp"/>

Step 8: Save the file and restart JBoss application server.

Step 9: Add the following scripts into the httpd.conf file in <Apache>\conf folder:

#Appeon Configuration:for 10X Web file compression#
<LocationMatch /gzip/*>
Header append Content-Encoding gzip
</LocationMatch>
#end of Appeon Configuration for 10X Web file compression#

In addition, remove the character "#" in front of the following script in the httpd.conf file:

LoadModule headers_module modules/mod_headers.so

Configuring DataWindow Data Cache (supports Windows platform only)

Under the installation directory of PowerServer Web Component (for example, C:\Inetpub\wwwroot\appeon), there are Apache20Support and Apache22Support folders.

  1. Copy the appeoncache.conf file from Apache20Support\conf or Apache22Support\conf to the %Apache%\conf folder. And make the appropriate configuration under the instructions provided in the file.

  2. Copy the modcache2.dll or modcache22.dll file from Apache20Support\modules or Apache22Support\modules folder to %Apache%\modules folder.

  3. Add the following script into the httpd.conf file in %Apache%\conf folder to load appeoncache.conf and modcache2.dll or modcache22.dll:

    # Cache Module Appeon Data Cache function, AX only 
    #------mod_cache for web cache configuration-------#
    LoadModule data_cache_module modules/modcache2.dll
    <IfModule mod_cache.c>
    include conf/appeoncache.conf
    </IfModule>
    #-----------------End configuration----------------#