| United States-English |
|
|
|
![]() |
HP WebQoS Peak for HP-UX Concepts and Operation Guide > Chapter 4 HP WebQoS Peak for the Zeus Web
ServerConfiguring HP WebQoS for Zeus |
|
You must install the Zeus web server before you run the setup script. If you re-install the Zeus web server, you must re-run the setup script. The setup script configures and enables WebQoS for all virtual servers. The setup script enables NSAPI and HTACCESS for each virtual server and creates the necessary directory and configuration files for NSAPI. The Zeus NSAPI process user and group are the same as those configured for the Zeus web server (which were configured when you initially installed the Zeus web server). To run the setup script, as user root, type the following:
The -p option automatically configures the user (hpacadmin) and password (hpacadmin) of the HP WebQoS Settings administration web page for each virtual server. If the -p option is not specified, you are prompted to enter the user and password for the HP WebQoS Settings administration web page for each virtual server. If you specify the -p option, HP recommends that you change the password. Refer to “Changing the Password of the HP WebQoS Settings Administration Web Page” in this section for more information. While running the setup script, at the Root pathname of Zeus server prompt, enter the Zeus home directory (the default is /usr/local/zeus). The setup script automatically configures and enables HP WebQoS. Default values set for all applicable configuration parameters are listed in “HP WebQoS Configurable Parameters for Zeus”. You can also run the setup script by typing ./setup from the /opt/webqospk directory. This script prompts you for the type of web server (Netscape or Zeus) that you are configuring. The following is an example of running the setup.zeus script. In this example, the Zeus web server is installed in the default /usr/local/zeus home directory and two virtual servers (server1 and server2) have been configured. User input is in bold. Note that when the password is entered, it does not appear on the screen.
To change the default password (hpacadmin) configured by the setup script, for each virtual
server, type where $ZEUSHOME is the Zeus home directory (the default is /usr/local/zeus), doc_root is the documentation root of the virtual server for which you are changing the password, hpacadmin is the name of the user whose password is being changed, and new_password is the new password assigned to the user. For example, if you want to change the password of the hpacadmin user of virtual server server1 to qosserver1 and the Zeus home directory is /usr/local/zeus and the documentation root is /webpages/server1, type the following: /usr/local/zeus/web/bin/htpasswd /webpages/server1/hpac/adminfile hpacadmin qosserver1 If the user does not exist in adminfile, it is added to the file. Otherwise, the existing password for the user is overwritten. If you want to modify the user, you can edit adminfile. However, you must use htpasswd to modify the password. You must have write permission for adminfile in order to change the password using the htpasswd command. You can edit the configuration parameters in two different ways:
The following is an example of the "HP WebQoS" page:
The following sections describe the parameters that can be set using the HP WebQoS Settings administration web page. “HP WebQoS Configurable Parameters for Zeus” for a list of the available configurable parameters for the Zeus server and a list of defaults already configured in config.ac. For the default value, the load threshold is set to 2. Table 4-1 HP WebQoS for Zeus Configurable Parameters: Admit Sessions
To calculate the load threshold, do the following:
Run top when performance is poor and acceptable to determine an acceptable load level. For the default, the interval between requests is set to 600 seconds (10 minutes) and the session duration is disabled. Table 4-2 HP WebQoS for Zeus Configurable Parameters: End Sessions
Rejected sessions can either be redirected or served a web page containing a standard error message or other information. If redirection is disabled or the redirect request is not accepted, a web page containing a standard error message or other information is returned. The default is to disable redirection and serve an error page to a rejected session. Table 4-3 HP WebQoS for Zeus Configurable Parameters: Redirect Rejected Sessions
When redirection is disabled, the following types of web pages can be served: Table 4-4 HP WebQoS for Zeus Configurable Parameters: Respond to Rejected Sessions
The following is the default allocation page served to the user: Example 4-2 Server Busy
To change the content of this page, you must edit the file $ZEUSHOME/ns-config/https-server_name/config/hpac/config.ac To change the “Server Busy” title, edit the deferral.title parameter. To change the content of the message, edit the deferral.message parameter. To edit the countdown line, edit the deferral.enterMsg parameter. Note that each parameter is ended by a single period on its own line. The default allocation page would include the following entries in the config.ac file:
HP WebQoS is enabled after you have installed it (provided you have met certain conditions; see “Configuring HP WebQoS for Zeus” for more information) or run the setup script (see “Running the setup.zeus Script” for more information). If you have stopped HP WebQoS, then you can start it again by configuring and specifying the load from the HP WebQoS Settings administration web page. To stop or disable HP WebQoS, set the Admit Session to “Always” from the HP WebQoS Settings administration web page. If you are permanently stopping HP WebQoS, you should remove HP WebQoS from your system (see “Removing HP WebQoS for Zeus” below for more information). You can remove HP WebQoS from one to all virtual servers. To remove HP WebQoS from one or more virtual servers, do the following:
To remove HP WebQoS from all virtual servers, do the following:
You can also use the /opt/webqospk/setup script which prompts you for the type of web server (Netscape or Zeus) you want to remove. The following is an example of removing HP WebQoS from one of two virtual servers configured on the system (remove HP WebQoS from server2; keep HP WebQoS installed on server1). The web server is installed in the default /usr/local/zeus directory. User input is in bold.
This section covers tasks beyond basic configuration. To control session admissions, HP WebQoS tracks the session state by including cookies in HTTP responses. For HP WebQoS to operate effectively, the server cannot generate all of its responses from the cache. This may cause the performance of the web server to be slow. However, you can tune the cache by configuring the $ZEUSHOME/ns-config/https-server_name/config/hpac/config.ac file to allow specified mime types to be cached or not cached. For example, if you serve HTTP pages with embedded images, you can cache the images by adding the following lines to the configuration file:
Or, if your pages are generated by an application such as an NSAPI plug-in or CGI script, you can allow all mime types to be cached except for the mime types associated with the application. For example, to cache all mime types except those generated by CGI scripts, add the following lines to the configuration file:
You must restart the web server if you make changes to the configuration file. If a page is not cachable, such as a dynamically created page or other pages marked by NSAPI as uncachable, you cannot cache it even if you specify it in the configuration file as cachable. If a web server hosts multiple virtual web sites, HP WebQoS can be configured to balance traffic between each site, allowing each site to share the system's resources equally. The description or pattern of the web servers' document roots for each virtual server must be configured in the $ZEUSHOME/ns-config/https-server_name/config/hpac/config.ac configuration file. HP WebQoS uses the isolate.pattern parameter to monitor each site's traffic. You must restart the web server after editing the configuration file. For example, a system is hosting two web sites for Company A and Company B. Company A's home page is located at /web_pages/company_a/index.html and Company B's home page is located at /web_pages/company_b/index.html. To monitor each site's traffic, add the following to the configuration file: isolate.pattern /web_pages/%[^/] Refer to documentation on the sscanf command for more information on constructing the pattern. After editing the configuration file, restart the web server. When a web server is running, it periodically broadcasts a message that it is up. When a web server is shut down, it broadcasts a message that is unavailable. When a web server is not running, it does not broadcast a message. Each web server in a cluster listens for these broadcast messages. Based on the messages received or not received, it will mark each system as up or down. The web server marks a system as up when it receives the appropriate broadcast message from that system. The web server marks a system as down when it receives the appropriate message or it fails to receive a message after a specified number of broadcast intervals. In the HP WebQoS $ZEUSHOME/ns-config/https-server_name/config/hpac/config.ac configuration file, you can configure how often messages are sent (broadcast interval) and how many messages can be missed before the system is marked as down. The parameters are:
where the interval is measured in seconds. The values given are the default values. If you configure these parameters, the web server must be restarted. Also, all systems in the cluster should use the same values for these parameters. Decreasing the broadcast interval decreases the time it takes to detect a failure. However, it also increases broadcast traffic. Sometimes, not all broadcast messages are received. Therefore, the number of misses should be set to a value greater than one. However, in a large cluster, removing a machine falsely does not severely impact the cluster's capacity and improves the responsiveness to failures. The maximum time to detect a failure can be determined by multiplying the broadcast interval by the number of misses. For the default values, the maximum failure detection time is three minutes. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||