vFabric Web Server Installation and Configuration VMware vFabric Web Server 5.1 VMware vFabric Suite 5.1 This document supports the version of each product listed and supports all subsequent versions until the document is replaced by a new edition. To check for more recent editions of this document, see http://www.vmware.com/support/pubs.
You can find the most up-to-date technical documentation on the VMware Web site at: https://www.vmware.com/ support/. The VMware Web site also provides the latest product updates. If you have comments about this documentation, submit your feedback to: docfeedback@vmware.com Copyright © 2012 VMware, Inc. All rights reserved. This product is protected by U.S. and international copyright and intellectual property laws. VMware products are covered by one or more patents listed at http:// www.vmware.
Table of Contents 1. About vFabric Web Server Installation and Configuration .............................................................................. 1 Intended Audience ......................................................................................................................... 1 2. Overview of vFabric Web Server ............................................................................................................ 3 Complete Packages and Modules in vFabric Web Server 5.1 ...........
iv vFabric Web Server
About vFabric Web Server Installation and Configuration 1 1. About vFabric Web Server Installation and Configuration Revised July 17, 2012. VMware vFabric Web Server Installation and Configuration describes product concepts and product-specific configuration tasks for VMware® vFabric™ Web Server.
2 vFabric Web Server 2 About vFabric Web Server Installation and Configuration
Overview of vFabric Web Server 3 2. Overview of vFabric Web Server vFabric Web Server is the Web server and load-balancing component of VMware vFabric Suite. vFabric Web Server 5.1 is based on Apache HTTP Server version 2.2. In addition to the standard features of Apache HTTP Server, vFabric Web Server provides the following mission-critical benefits: • Ability to easily install multiple instances of vFabric Web Server running on a single computer.
4 vFabric Web Server Many applications can be built to support FastCGI; consult your language or application documentation for details. The application providing FastCGI services is launched by mod_fcgid on the initial request, and reused for subsequent requests to that application or language environment. For details on configuring an application, including the number of persistent processes created, see Apache Module mod_fcgid.
Installing vFabric Web Server 5 3. Installing vFabric Web Server vFabric Web Server has several options for installation and setup. Installation options vary according to whether you install Web Server standalone or as part of vFabric Suite installation and whether your operating system is Unix, Windows, or another supported platform.
6 vFabric Web Server 5.1. Additionally, the RPMs in vfabric-all-repo might be used by customers who have not bought a vFabric 5.1 Suite Standard or Advanced license. In addition, each of the preceding repositories has separate URLs for RHEL 5 and RHEL 6. If you are using only RPMs certified for vFabric 5.1 Suite Advanced or Standard, then you install only vfabric-5.1repo-5.1. If, however, you are upgrading a vFabric component to a version that has not yet been officially certified for vFabric 5.
Installing vFabric Web Server 3. 7 Enter y at the prompt to begin the actual installation. When the installation process finishes, you will see a Complete! message at the end. Check the output of the command to ensure that the installation was successful. The yum command: • Installs vFabric Web Server into the /opt/vmware/vfabric-web-server directory. • Sets the owner of all directories and files under /opt/vmware/vfabric-web-server to root.
8 vFabric Web Server prompt# cd /opt/vmware 5. If necessary, change the permissions of the downloaded ZIP file to make it executable: prompt# chmod 755 vfabric-web-server-version-x86_64-linux-glibc2.zip.sfx 6. Self-extract the files from the downloaded ZIP by using the file name as a command. For example: prompt# ./vfabric-web-server-version-x86_64-linux-glibc2.zip.sfx When it completes, the vFabric Web Server files are located in the vfabric-web-server subdirectory. 7.
Installing vFabric Web Server 9 Be sure to choose the correct architecture (32- or 64-bit). For example, the file to install vFabric Web Server on a 64-bit Windows platform is vfabric-web-server-version-x64-windows.zip.exe. 4. Execute the downloaded *.zip.exe file to self-extract the files into the directory you created. You can do this, for example, by opening Window Explorer, navigating to the directory, and double-clicking on the *.zip.exe file.
10 vFabric Web Server • Unix: /etc/opt/vmware/vfabric/ 3. Ensure that the file is readable by the user who runs the Web Server instance. Because this user is typically root, no additional steps are typically required on Unix. Windows users who adjust the vFabric Web Server service to run as an account other than LocalSystem will need to verify these permissions.
Installing vFabric Web Server 11 Upgrading vFabric Web Server The instructions for upgrading vFabric Web Server differ slightly depending on your operating system and how you installed the original version. See: • RHEL: Upgrade Using the VMware RPM Repository • Unix: Upgrade Using a Self-Extracting ZIP • Windows: Upgrade Using a Self-Extracting ZIP RHEL: Upgrade Using the VMware RPM Repository You use yum upgrade to upgrade an existing RHEL installation of vFabric Web Server to the latest version.
12 vFabric Web Server Procedure 1. Download the appropriate vFabric Web Server self-extracting ZIP from the VMware Download Web site and place it in the parent directory of the main Web Server installation directory (vfabric-web-server.) For example, if you originally installed Web Server in /opt/vmware/vfabric-web-server, which in turn means that the HTTPD binaries are located in /opt/vmware/vfabric-web-server/httpd-2.2.version, then place the downloaded ZIP file in /opt/vmware.
Installing vFabric Web Server 2. 13 Download the appropriate vFabric Web Server self-extracting ZIP from the VMware Download Web site and place it in the parent directory of the main Web Server installation directory (vfabric-web-server.) For example, if you originally installed Web Server in c:\opt\vmware\vfabric-web-server, which in turn means that the HTTPD binaries are located in c:\opt\vmware\vfabric-web-server\httpd-2.2.version, then place the downloaded ZIP file in c:\opt\vmware.
14 vFabric Web Server 14 Installing vFabric Web Server
Creating and Using vFabric Web Server Instances 15 4. Creating and Using vFabric Web Server Instances To start using vFabric Web Server, you explicitly create a new instance after you install it. An instance is not created for you by default.
16 vFabric Web Server Procedure 1. Log on to your computer as root (Unix) or the Administrator user (Windows) and open a terminal (Unix) or command window (Windows). Note for Windows: Depending on the Windows version, you may not have the required permissions when you start the command window, even if you logged in as the Administrator user.
Creating and Using vFabric Web Server Instances 17 Table 4.1. Options of the newserver Command Option Description Required? --server=servername Name of the new vFabric Web Server instance. The value of this option also can be the name of the directory that contains the instance configuration files, and by default is the name of the host. Yes. --httpddir=httpddir Directory that contains the Apache HTTP binaries. No.
18 vFabric Web Server Option Description Required? --sourcedir=sourcedir Name of the directory that contains the template that newserver uses to create the new vFabric Web Server instance. No. The default value is httpdir/_instance. Table 4.2. newserver Prompts Prompt Description Enable SSL and create a default key [y/n]? Enabling SSL provides secure communication between client and server by allowing mutual authentication; the use of digital signatures for integrity; and encryption for privacy.
Creating and Using vFabric Web Server Instances 19 Unix: Start and Stop vFabric Web Server Instances You start, stop, or restart a vFabric Web Server instance on Unix with the httpdctl shell script in the bin directory of the instance. Warning: You always use the start script in the bin of the instance directory, such as /opt/vwmare/vfabric-webserver/myserver/bin. Do not use the start script in the httpd-2.2/bin sub-directory of the main installation directory.
20 vFabric Web Server Windows: Start and Stop vFabric Web Server Instances You start, stop, or restart a vFabric Web Server instance on Windows by first installing it as Windows service using the httpdctl.bat script in the bin directory of the instance directory, and subsequently using the Windows Services console to start or stop it. Warning: You always use the start script in the bin of the instance directory, such as c:\vmware\vfabric-web-server \myserver\bin.
Creating and Using vFabric Web Server Instances 21 What to do next • Complete the procedure in Serve a Sample HTML File from your vFabric Web Server Instance. • Configure your instance as described in Configuring vFabric Web Server. Serve a Sample HTML File from Your vFabric Web Server Instance After you install vFabric Web Server and create an instance, you can use it to host your entire Web site.
22 vFabric Web Server What to do next • Configure vFabric Web Server instances to take advantage features such as load balancing, virtual hosts, and SSL. See Configuring vFabric Web Server Instances.
Configuring vFabric Web Server Instances 23 5. Configuring vFabric Web Server Instances The default configuration of a newly created vFabric Web Server instance is fairly simple. Although the configuration is likely adequate for your needs, sometimes you might need to further configure the instance to enable one of its many useful features, such as load-balancing between two or more tc Server instances. This chapter provides some information to get you started.
24 vFabric Web Server In the procedure that follows, you configure a vFabric Web Server instance to run in front of the tc Runtime instances; this vFabric Web Server instance receives all requests from users, and then passes them back to the tc Runtime instances using a specified load-balancing algorithm. Responses from the tc Runtime instances are then routed back through this same vFabric Web Server instance.
Configuring vFabric Web Server Instances 1. 25 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.sh stop 2. Open the httpd.
26 vFabric Web Server • bytraffic: performs weighted traffic byte count balancing. • bybusyness: performs pending request balancing. • Use the ProxyPass and ProxyPassReverse to specify the context URLs of the application that will be routed to the tc Runtime instances that you have configured in the load balancing scheme.
Configuring vFabric Web Server Instances 27 You have now configured load balancing for the two tc Runtime instance using the front-end vFabric Web Server. What to do next • For full reference documentation on the directives described in step 3, along with additional parameters you can use, see Apache Module mod_proxy on the Apache Software Foundation Web site.
28 vFabric Web Server #LoadModule bmx_module c:/opt/vmware/vfabric-web-server/httpd-2.2/modules/mod_bmx.so #LoadModule bmx_status_module c:/opt/vmware/vfabric-web-server/httpd-2.2/modules/mod_bmx_status.so #LoadModule bmx_vhost_module c:/opt/vmware/vfabric-web-server/httpd-2.2/modules/mod_bmx_vhost.so 2. To allow BMX access to processes running on hosts other than the localhost, edit the directive in the conf/extra/httpd-info.
Security Information 29 6. Security Information VMware is committed to providing products and solutions that allow you to assess the security of your information, secure your information infrastructure, protect your sensitive information, and manage security information and events to assure effectiveness and regulatory compliance.
30 vFabric Web Server • access_log: Contains information about all Web Server requests. • ssl_request_log: Applies only if you enabled SSL. Contains information about requests that came over HTTPS. These log files are specific to a Web Server instance and are stored by default in the INSTANCE-DIR/logs directory, where INSTANCE-DIR refers to the directory in which the Web Server instance is located, such as /opt/vmware/vfabric-webserver/myserver.
Additional Documentation 31 7. Additional Documentation The documentation in this guide provides information about what vFabric Web Server contains; how to install it; and how to create, start, and stop instances. The vFabric Web Server documentation does not, however, provide details about configuring and using the core Apache HTTP component; for that you must go elsewhere, such as the Apache documentation. • Apache HTTP Server 2.2 http://httpd.apache.org/docs/2.2/ • OpenSSL http://www.openssl.
32 vFabric Web Server 32 Additional Documentation