Tuesday, April 8, 2014

Configuring Apache Load balancer URL

Problem Statement :

You have a clustered environment with 2 or more nodes or you have an Apache layer between the user and your application servers. The users access your application interfaces through the Apache layer, which is responsible for load-balancing, SSO, etc. But when you load the portal or admin console you find that some resources are directly referenced from the application server nodes instead of going through Apache.

Resolution :

Put the following into a file (101CustomLoadBalancer.xml) and place it at

/app/websphere/<DMGR_PROFILE>/config/cells/<CELL>/nodes/<NODE>/servers/<APP_TARGET_JVM>/process-<center/server>/config

<properties>
    <authoring-environment merge="mergeChildren">
        <images-prefix merge="replace">https://<APACHE URL>/teamworks</images-prefix>
        <portal-prefix merge="replace">https://<APACHE URL>/portal</portal-prefix>
        <servlet-prefix merge="replace">https://<APACHE URL>/teamworks</servlet-prefix>
        <webapi-prefix merge="replace">https://<APACHE URL>/webapi</webapi-prefix>
        <repository-prefix merge="replace">https://<APACHE URL>/ProcessCenter</repository-prefix>
        <process-help-wiki-url-view merge="replace">https://<APACHE URL>/processhelp/en/%TITLE%?teamworksTitle=%TEAMWORKS_TITLE%</process-help-wiki-url-view>
        <process-help-wiki-url-edit merge="replace">https://<APACHE URL>/processhelp/en/Special:Edit?topic=%TITLE%&amp;teamworksTitle=%TEAMWORKS_TITLE%</process-help-wiki-url-edit>
    </authoring-environment>
    <common merge="mergeChildren">
        <portal-prefix merge="replace">https://<APACHE URL>/portal</portal-prefix>
        <process-admin-prefix merge="replace">https://<APACHE URL>/ProcessAdmin</process-admin-prefix>
        <!-- Disable for Process Center -->
        <teamworks-webapp-prefix merge="replace">https://<APACHE URL>/teamworks</teamworks-webapp-prefix>
        <coach-designer-xsl-url merge="replace">https://<APACHE URL>/teamworks/coachdesigner/transform/CoachDesigner.xsl</coach-designer-xsl-url>
       
        <webservices merge="mergeChildren">
            <base-url merge="replace">https://<APACHE URL>/teamworks/webservices</base-url>
        </webservices>
        <xml-serialization merge="mergeChildren">
            <default-namespace-uri merge="replace">https://<APACHE URL>/schema/</default-namespace-uri>
        </xml-serialization>
    </common>
    <server merge="mergeChildren">
        <repository-server-url merge="replace">https://<APACHE URL>/ProcessCenter</repository-server-url>
        <email merge="mergeChildren">
            <mail-template merge="mergeChildren">
                <client-link merge="replace">https://<APACHE URL>/teamworks</client-link>
            </mail-template>
        </email>
    </server>
</properties>

No comments:

Post a Comment