5.2
Table Of Contents
- vFabric Web Server Installation and Configuration
- Table of Contents
- 1. About vFabric Web Server Installation and Configuration
- 2. Overview of vFabric Web Server
- 3. Installing vFabric Web Server
- Installation Note for vFabric Suite Customers
- Available Distribution Packages
- RHEL: Install vFabric Web Server from an RPM
- Unix: Install vFabric Web Server from a Self-Extracting ZIP
- Windows: Install vFabric Web Server from a ZIP File
- Activate a vFabric Web Server Local License
- Description of the vFabric Web Server Installation
- 4. Upgrading vFabric Web Server
- 5. Creating and Using vFabric Web Server Instances
- 6. Configuring vFabric Web Server Instances
- Using Sample Configuration Files to Enable Features and Modify Configuration
- Configure Load Balancing Between Two or More tc Runtime Instances
- Configure SSL Between vFabric Web Server and vFabric tc Server
- Configure tc Runtime Instances to Use SSL
- Configure the vFabric Web Server Instance to Use SSL
- Restrict Communication With tc Runtime Instances to Known Clients
- Update the Web Server Configuration for HTTPS Connections to tc Runtime Instances
- Configure vFabric Web Server to Authenticate Itself Using a Specific Client Certificate
- Configure BMX for Monitoring vFabric Web Server Instances
- 7. Security Information
- 8. Managing Planned and Unplanned Outages
- 9. Additional Documentation
Configuring vFabric Web Server
Instances
31
VMware vFabric Suite 5.2 31
Procedure
To configure load balancing for the scenario described in the introduction to this section, follow these steps:
1. On the computer on which vFabric Web Server is installed, stop the instance, if it is currently running. Following the
example and assumptions:
prompt# cd /opt/vmware/vfabric-web-server/lb-server
prompt# bin/httpdctl stop
2. Open the httpd.conf configuration file of the vFabric Web Server instance and ensure that the three required
LoadModule directives (proxy_balancer_module, mod_proxy, and mod_proxy_http, are present and enabled
(in other words, are not commented out):
LoadModule proxy_balancer_module "VFWS-INSTALL/httpd-2.2/modules/mod_proxy_balancer.so"
LoadModule proxy_module "VFWS-INSTALL/httpd-2.2/modules/mod_proxy.so"
LoadModule proxy_http_module "VFWS-INSTALL/httpd-2.2/modules/mod_proxy_http.so"
where VFWS-INSTALL refers to the directory in which you installed vFabric Web Server. If they are not in the file, add
them in the same location as the other LoadModule directives.
Following our example, the directive configurations would be:
LoadModule proxy_balancer_module "/opt/vmware/vfabric-web-server/httpd-2.2/modules/mod_proxy_balancer.so"
LoadModule proxy_module "/opt/vmware/vfabric-web-server/httpd-2.2/modules/mod_proxy.so"
LoadModule proxy_http_module "/opt/vmware/vfabric-web-server/httpd-2.2/modules/mod_proxy_http.so"
The vFabric Web Server configuration file is located in the conf directory of your vFabric Web Server instance (/opt/
vmware/vfabric-web-server/lb-server/conf in our example).
3. In the same httpd.conf file, add the proxy configuration.
Use the <Proxy> element to specify the list of tc Runtime instances and the method of load balancing you want to use.
Then use the ProxyPass and ProxyPassReverse directives to specify the URLs that will use this proxy and load-
balancing (both for requests and responses.) For example:
<Proxy balancer://my-balancer>
BalancerMember http://192.168.0.203:8081 route=instanceOne loadfactor=1
BalancerMember http://192.168.0.203:8082 route=instanceTwo loadfactor=1
ProxySet lbmethod=byrequests
</Proxy>
ProxyPass /my-app balancer://my-balancer/my-app
ProxyPassReverse /my-app http://192.168.0.203:8081/my-app
ProxyPassReverse /my-app http://192.168.0.203:8082/my-app
In the preceding example:
• The balancer parameter of the <Proxy> element specifies a unique identifier for this load balancer configuration.
• Each tc Runtime instance that is serviced by this load balancer must have its own BalancerMember; the first
parameter of this directive specifies the full IP address (including port number) of the tc Runtime instance.
• The route parameter contains session ID information. You later use the value of this parameter in the tc
Runtime configuration file to configure sticky sessions; for now, just ensure that the values are unique for each
BalancerMember.
• The loadfactor parameter specifies how much load a particular member carries. If you want each member to carry
the same load, set the numbers equal to each other (as in the example above). If, however, you want one member to work
three times harder than the other, set the load factors to 3 and 1.