11.2.3 Configure the Web servers for WebSphere Commerce

Having set up Load Balancer to route requests to the Web servers, and, in case of MAC forwarding, having enabled the Web servers' network interfaces to accept packets on the Load Balancer cluster IP address (by adding the loopback alias as described in Configure Web servers for MAC forwarding), we now need to configure the Web servers to listen to the cluster IP address.

After creating a WebSphere Commerce instance, the IBM HTTP Server configuration file, httpd.conf, typically contains Listen and VirtualHost statements (as shown in Example 11-4) for Web server node 1 before configuring load balancing.

Example 11-4 httpd.conf for Web server node 1 before load balancing

...

Listen srvb501.torolab.ibm.com:80
Listen srvb501.torolab.ibm.com:443
...

########## IBM WebSphere Commerce (Do not edit this section) ...
#Instance name : demo
<VirtualHost srvb501.torolab.ibm.com:80>
ServerName srvb501.torolab.ibm.com
Alias   /wcsstore "/usr/.../Stores.war"
Alias   /wcs "/usr/.../CommerceAccelerator.war"
</VirtualHost>
<VirtualHost srvb501.torolab.ibm.com:443>
SSLEnable
SSLClientAuth 0
ServerName srvb501.torolab.ibm.com
Alias   /wcsstore "/usr/.../Stores.war"
Alias   /wcs "/usr/.../CommerceAccelerator.war"
</VirtualHost>
...

We need to change the listen statements and the VirtualHost elements. To till be able to access the store directly through the Web servers, we used an asterisk (*) as the host name rather than duplicating the listen statements and VirtualHost elements. Example 11-5 shows the relevant lines of the resulting configuration, which can be used for all Web server nodes.

Example 11-5 httpd.conf for Web server node 1 with load balancing

...

Listen *:80
Listen *:443
...

########## IBM WebSphere Commerce (Do not edit this section) ...
#Instance name : demo
<VirtualHost *:80>
ServerName srvb501.torolab.ibm.com
Alias   /wcsstore "/usr/.../Stores.war"
Alias   /wcs "/usr/.../CommerceAccelerator.war"
</VirtualHost>
<VirtualHost *:443>
SSLEnable
SSLClientAuth 0
ServerName srvb501.torolab.ibm.com
Alias   /wcsstore "/usr/.../Stores.war"
Alias   /wcs "/usr/.../CommerceAccelerator.war"
</VirtualHost>
...

After changing httpd.conf on all load-balanced Web servers, the Web servers have to be restarted (see Restart the Web server).
xxxx