Configuring the setup

  1. Update the /ua1001/cloudio/apache/conf/httpd.conf file with the mod_jk connector module information.

LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkLogFile logs/jk.log
JkLogLevel error
JkMount /* router
JkMount /jk_status status

The Apache configuration reads the worker.properties file to obtain the list of Tomcat servers associated with it and to load the balance based on the priority assigned. All the Tomcat servers that are to be added to the worker setup should be listed as workers using the AJP port in the Tomcat_Home/conf/server.xml file.

2. If the platform version is 2.4 Fusion, update the httpd.conf file for code compression at worker level.

<IfModule mod_mime.c>
AddType application/javascript .js
AddType text/css .css
</IfModule>
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/css text/html text/plain text/xml application/javascript
<IfModule mod_setenvif.c>
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
</IfModule>

3. Create /ua1001/cloudio/apache/conf/workers.properties file with the content listed below

worker.list=router,status

worker.worker1.port=8109
worker.worker1.host=localhost
worker.worker1.type=ajp13
worker.worker1.lbfactor=1
worker.worker1.sticky_session=0

worker.worker2.port=8209
worker.worker2.host=localhost
worker.worker2.type=ajp13
worker.worker2.lbfactor=1
worker.worker2.sticky_session=0

worker.worker3.port=8309
worker.worker3.host=localhost
worker.worker3.type=ajp13
worker.worker3.lbfactor=1
worker.worker3.sticky_session=0

worker.router.type=lb
worker.router.balance_workers=worker1,worker2,worker3

worker.status.type=status

4. Start all the Tomcat instances using the following commands:

cd $TOMCAT_HOME/bin
./startup.sh

5. Start the Apache server using the following command:

PREFIX/bin/apachectl -k start

6. While the Tomcat instances are running, open the console and confirm access to the CloudIO application.

Last updated