Configuring Apache HTTP Server

Starting in Fix Pack 15, you can use Apache HTTP Server as your HTTP server and gateway to LSF Application Center and balance the load among servers. Configure the Apache HTTP Server on a host other than the LSF Application Center server host to ensure availability of the gateway if an LSF Application Center server fails.

Before you begin

  • Ensure you have installed a version of Apache HTTP Server that is newer than version 2.4.37.
  • The mod_ssl component needs to be installed if the https component is enabled.

Procedure

  1. As root, log on to Apache HTTP Server host.
  2. Edit the Apache HTTP Server configuration file, /etc/httpd/conf/httpd.conf, by adding the following lines all the LSF Application Center servers:

    The following examples illustrates adding LSF Application Center hostA (9.112.254.196) and hostB (9.112.254.68). Note that the server names (hostA and hostB) must be unique and the same as the transport host name of the LSF Application Center server. In general, use the long host DNS name and ensure the name is the same as the hostname for the JSESSIONID value:

    # For https, uncomment below line
    # loadModule ssl_module /usr/lib64/httpd/modules/mod_ssl.so
    #for http, it is 80, for https, it is 443
    <VirtualHost *:80>
            ProxyRequests Off
            ProxyPreserveHost On
    
            #for https, open below 4 items.
            #SSLEngine on
            #SSLProxyEngine on
            #SSLProxyCheckPeerCN on
            #SSLProxyCheckPeerName on
    
            <Proxy balancer://pacclusterin>
                   #for http or https
            # Server 1, for https, change http to https, change the port from 8080 to 8443
                    BalancerMember http://9.112.254.196:8080 route=hostA
            # Server 2
                    BalancerMember http://9.112.254.68:8080 route=hostB
            </Proxy>
    
            <Proxy balancer://ws-balancer>
                    #for vnc ws or wss,for http proxy is ws,  for https proxy is wss.
                    BalancerMember ws://9.112.254.196:6080 route=hostA
                    BalancerMember ws://9.112.254.68:6080  route=hostB
            </Proxy>
    
            <Proxy balancer://pnc-balancer>
                    # for pnc ws or wss, for http proxy is ws, port is 8081, for https proxy is wss, port is 8444.
                    #BalancerMember wss://<pac1 dns or ip>:8444 route=<pac1 hostname>
                    BalancerMember ws://9.112.254.196:8081 route=hostA
                    BalancerMember ws://9.112.254.68:8081  route=hostB
                    #BalancerMember wss://<pac1 dns or ip>:8444  route=<pac2 hostname>
            </Proxy>
    
            ProxyPass /platform balancer://pacclusterin/platform stickysession=JSESSIONID|jsessionid stickysessionsep=:
            ProxyPassReverse /platform balancer://pacclusterin/platform
    
            ProxyPass /websockify balancer://ws-balancer/websockify stickysession=JSESSIONID|jsessionid stickysessionsep=:
            ProxyPassReverse /websockify balancer://ws-balancer/websockify
    
            ProxyPass /notification balancer://pnc-balancer/notification stickysession=JSESSIONID|jsessionid stickysessionsep=:
            ProxyPassReverse /notification balancer://pnc-balancer/notification
    
            #for https need uncomment below 4 items.
            #SSLCertificateFile /root/proxy.cert
            #SSLCertificateKeyFile /root/proxy.key
            #SSLProxyCACertificateFile "/root/cacert.pem"
    
    </VirtualHost>
  3. Edit the $GUI_CONFDIR/pmc.conf file on the LSF Application Center server by adding the NoVNCProxyHost and NoVNCProxyPort lines to the file; for example:
    NoVNCProxyHost=Apache_HTTP_server_host
    NoVNCProxyPort=80

    Specify port 80 for HTTP and port 443 for HTTPS.

  4. Edit the pnc-config.xml file, so that the <wsHost> item uses the full name of the Apache HTTP Server (for example, <wsHost>Apache_HTTP_server_host</wsHost>), and add the <wsHostPort> and <wsHostSSLPort> items.
    Here is an example of an updated pnc-config.xml file:
    <!-- Host name or IP address of the IBM Spectrum LSF Application Center server for internal communications between system daemons. This value is automatically entered at installation-->
        <!-- <restHost>FIRST_PAC_HOSTNAME</restHost> -->
        <restHost>FIRST_PAC_HOSTNAME</restHost>
        <port>8081</port>
        <sslPort>8444</sslPort>
        <!--Host name or IP address of the IBM Spectrum LSF Application Center server for communication with the Web Services. This value is automatically entered at installation--> 
        <!-- <wsHost>Apache_HTTP_server_host</wsHost>  -->
        <wsHost>Apache_HTTP_server_host</wsHost>
        <!-- for non-apache proxy we must remove the item of wsHostPort and wsHostSSLPort -->
        <wsHostPort>80</wsHostPort>
        <wsHostSSLPort>443</wsHostSSLPort>
        <ConnMode>
                <android>GCM</android>
                <ios>APNs</ios>
        </ConnMode>
  5. Restart Apache HTTP Server:
    systemctl stop httpd
    systemctl start httpd
    
  6. From any browser, check that you have access to LSF Application Center by entering in the URL of Apache HTTP Server. For example, replace Apache_HTTP_server_host with your Apache HTTP Server's host name: http://Apache_HTTP_server_host/platform.