Install the Apache server and the mod_jk module.
On Fedora, the package containing Apache HTTP Server is named httpd.
You will probably need to build and install mod_jk from sources. In this case, the httpd-devel package might be useful.
Verify that the
mod_jk.so file exists in
On Ubuntu, the packages are named apache2 and libapache2-mod-jk.
Set up Apache to use
If you use Fedora and recent version of Apache (2.2+), put the
Do not forget to load the module by appending the following line to
LoadModule jk_module modules/mod_jk.so
mod-jk.conf file looks like this:
... JkWorkersFile /path/to/file/workers.properties # Where to put jk logs JkLogFile /var/log/apache2/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel debug # 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" JkMountFile /path/to/file/uriworkermap.properties # Add shared memory. # This directive is present with 1.2.10 and # later versions of mod_jk, and is needed for # for load balancing to work properly JkShmFile /var/log/apache2/jk.shm # Add jkstatus for managing runtime data <Location /jkstatus/> JkMount status </Location> ...
In Ubuntu, typically during installation of libapache2-mod-jk, the mod_jk is enabled automatically,
as well as their symlinks under
You need to edit
/etc/apache2/mods-available/jk.conf with the content above.
workers.properties file with the path you configured above.
node1" and "
with the values of
workers.properties file looks like this:
# Define list of workers that will be used for mapping requests worker.list=loadbalancer,status # modify the host as your host IP or DNS name worker.node1.port=8009 worker.node1.host=192.168.210.101 worker.node1.type=ajp13 worker.node1.lbfactor=1 ## modify the host as your host IP or DNS name worker.node2.port=8009 worker.node2.host=192.168.210.102 worker.node2.type=ajp13 worker.node2.lbfactor=1 # Load-balancing behaviour worker.loadbalancer.type=lb worker.loadbalancer.method=Session worker.loadbalancer.balance_workers=node1,node2 worker.loadbalancer.sticky_session=1 #worker.list=loadbalancer worker.status.type=status
uriworkermap.properties file should look like this:
/status=status /status/*=status /*=loadbalancer
In Platform JBoss, you need to configure an AJP connector, as described below.
You need to modify the
Find the subsystem urn:jboss:domain:web:1.5 section and add the connector:
<subsystem xmlns="urn:jboss:domain:web:1.5" default-virtual-server="default-host" native="false">
<connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp"/>
You have configured everything properly, but are still unable to access the portal via Apache.
When accessing eXo Platform via Apache, you get the "503 Service Temporarily Unavailable" response.
The cluster itself is working and you can access individual eXo Platform nodes directly.
mod_jk is working,
but Tomcat is reported as likely not to be running on the specified port.
If you are using Fedora, SELinux might be stopping https from accessing something important, e.g. jk.shm. Check SELinux alerts to see if that is the case.
Ideally, you would create a policy to deal with this. A quick workaround is to temporarily disable SELinux to allow Apache
to initialize the
mod_jk connector properly. You can do this using the following command: