Apache HTTP

 

1Introduction

The Apache HTTP Server is the world's most used web server software. Apache development began in 1995 and played a key role in the initial growth of the World Wide Web and quickly became the dominant HTTP server. It has remained most popular since 1996 and in 2009 it became the first web server software to serve more than 100 million websites.

The KEMP LoadMaster is used to load balance the Apache HTTP workload. The LoadMaster offers advanced Layer 4 and Layer 7 server load balancing, SSL Acceleration and a multitude of other advanced Application Delivery Controller (ADC) features. The LoadMaster intelligently and efficiently distributes user traffic among the application servers so that users get the best experience possible.

1.1Document Purpose

This document provides the recommended LoadMaster settings used when load balancing the Apache HTTP workload. The KEMP Support Team is available to provide solutions for scenarios not explicitly defined. The KEMP support site can be found at: https://support.kemptechnologies.com

1.2Intended Audience

This document is intended to be read by anyone who is interested in configuring the LoadMaster to optimize the Apache HTTP server.

2Apache HTTPTemplate

KEMP has developed a template containing our recommended settings for Apache HTTP. You can install this template on the LoadMaster and use it when creating Virtual Services. Using a template automatically populates the settings in the Virtual Services, which is quicker and easier than manually configuring each Virtual Service. If needed, you can make changes to any of the Virtual Service settings after using the template.

Download released templates from the Templates section on the KEMP documentation page: http://kemptechnologies.com/documentation/.

For more information and steps on how to import and use templates, refer to the Virtual Services and Templates, Feature Description.

For steps on how to manually add and configure each of the Virtual Services, refer to Section 4 of this document.

3Architecture

Figure 1: Load Balancing Apache HTTP

4Configure the LoadMaster

The deployed Apache HTTP environment determines which of the following setups is used.

4.1Enable Subnet Originating Requests Globally

It is best practice to enable the Subnet Originating Requests option globally.

In a one-armed setup (where the Virtual Service and Real Servers are on the same network/subnet), Subnet Originating Requests is usually not needed. However, enabling Subnet Originating Requests should not affect the routing in a one-armed setup.

In a two-armed setup where the Virtual Service is on network/subnet A, for example, and the Real Servers are on network B - Subnet Originating Requests should be enabled on LoadMasters with firmware version 7.1-16 and above.

When Subnet Originating Requests is enabled, the LoadMaster routes traffic so that the Real Server sees traffic arriving from the LoadMaster interface that is in that network/subnet.

When Subnet Originating Requests is enabled globally, it is automatically enabled on all Virtual Services. If the Subnet Originating Requests option is disabled globally, you can select whether or not to enable Subnet Originating Requests on a per-Virtual Service basis.

To enable Subnet Originating Requests globally, follow the steps below:

  1. In the main menu of the LoadMaster WUI, go to System Configuration > Miscellaneous Options > Network Options.

Figure 4‑1: Subnet Originating Requests

  1. Select the Subnet Originating Requests check box.

4.2Enable Check Persist Globally

It is recommended that you change the Always Check Persist option to Yes – Accept Changes. Use the following steps:

  1. Go to System Configuration> Miscellaneous Options > L7 Configuration.

Figure 4‑2: Enable Check Persist

  1. Click the Always Check Persist dropdown arrow and select Yes – Accept Changes.

4.3Create the Apache HTTP Virtual Services

The following sections describe the recommended settings for the Apache HTTP Virtual Services.

4.3.1Create an Apache HTTP Virtual Service

The following are the steps involved and the recommended settings to configure the Apache HTTP Virtual Service:

  1. In the main menu of the LoadMaster Web User Interface (WUI), go to Virtual Services> Add New.

Figure 4‑3: Virtual Service parameters

  1. Type a valid Virtual Address.
  2. Type 80 as the Port.
  3. Enter a recognizable Service Name, such as Apache HTTP Virtual Service.
  4. Click Add this Virtual Service.
  5. Configure the settings as recommended in the following table:

Section

Option

Value

Standard Options

Persistence Mode

Active Cookie

 

Timeout

1 Hour

 

Cookie name

JSESSIONID

 

Scheduling Method

least connection

 

Idle Connection Timeout

900

Table 4‑1: Apache HTTP Recommended Settings

  1. Add the Real Servers:

a)Expand the Real Servers section.

b)Click Add New.

c)Enter the address of the relevant Real Server.

d)Complete the other fields as required.

e)Click Add this Real Server then click OK to the pop-up message.

f)Repeat the steps above to add more Real Servers as needed, based on your environment.

4.3.2Create an Apache HTTPS Virtual Service

The following are the steps involved and the recommended settings to configure the Apache HTTPS Virtual Service:

  1. In the main menu of the LoadMaster WUI, go to Virtual Services> Add New.

Figure 4‑4: Virtual Service parameters

  1. Type a valid Virtual Address.
  2. Type 443 as the Port.
  3. Enter a recognizable Service Name, such as Apache HTTPS Virtual Service.
  4. Click Add this Virtual Service.
  5. Configure the settings as recommended in the following table:

Section

Option

Value

Comment

Standard Options

Persistence Mode

Source IP Address

 
 

Timeout

1 Hour

 
 

Scheduling Method

least connection

 
 

Idle Connection Timeout

900

 

Advanced Properties

Add a Port 80 Redirector VS

https://%h%s

Click Add HTTP Redirector. This automatically creates a redirect on port 80.

Table 4‑2: Apache HTTPS Recommended Settings

  1. Add the Real Servers:

a)Expand the Real Servers section.

b)Click Add New.

c)Enter the address of the relevant Real Server.

d)Complete the other fields as required.

e)Click Add this Real Server then click OK to the pop-up message.

f)Repeat the steps above to add more Real Servers as needed, based on your environment.

Create an Apache HTTPS Redirect Virtual Service

Clicking the Add HTTP Redirector button automatically creates a port 80 redirect Virtual Service. This is optional, but the purpose of this Virtual Service is to redirect any clients who have connected using HTTP to the HTTPS Virtual Service. KEMP also recommends changing the Real Server Check Method and Persistence Mode to None.

4.3.3Create an Apache HTTPS Offloaded Virtual Service

The following are the steps involved and the recommended settings to configure the Apache HTTPS Offloaded Virtual Service:

  1. In the main menu of the LoadMaster WUI, go to Virtual Services> Add New.

Figure 4‑5: Virtual Service parameters

  1. Type a valid Virtual Address.
  2. Type 443 as the Port.
  3. Enter a recognizable Service Name, such as Apache HTTPSOffloaded Virtual Service.
  4. Click Add this Virtual Service.
  5. Configure the settings as recommended in the following table:

Section

Option

Value

Comments

Standard Options

Persistence Mode

Active Cookie

 
 

Timeout

1 Hour

 
 

Cookie name

JSESSSIONID

 
 

Scheduling Method

least connection

 
 

Idle Connection Timeout

900

 

SSL Properties

SSL Acceleration

Enabled

 
 

Cipher Set

BestPractices

 

Advanced Properties

Add a Port 80 Redirector VS

https://%h%s

Click Add HTTP Redirector. This automatically creates a redirect on port 80.

Table 4‑3: Apache HTTPS Offloaded HTTP Redirect Recommended Settings

  1. Add the Real Servers:

a)Expand the Real Servers section.

b)Click Add New.

c)Enter the address of the relevant Real Server.

d)Complete the other fields as required.

e)Click Add this Real Server then click OK to the pop-up message.

f)Repeat the steps above to add more Real Servers as needed, based on your environment.

Create an Apache HTTPS Offloaded Redirect Virtual Service

Clicking the Add HTTP Redirector button automatically creates a port 80 redirect Virtual Service. This is optional, but the purpose of this Virtual Service is to redirect any clients who have connected using HTTP to the HTTPS Virtual Service. KEMP also recommends changing the Persistence Mode to None.

4.3.4Create an Apache HTTPS Re-encrypt Virtual Service

The following are the steps involved and the recommended settings to configure the Apache HTTPS Re-encrypt Virtual Service:

  1. In the main menu of the LoadMaster WUI, go to Virtual Services> Add New.

Figure 4‑6: Virtual Service parameters

  1. Type a valid Virtual Address.
  2. Type 443 as the Port.
  3. Enter a recognizable Service Name, such as Apache HTTPS Re-encrypt Virtual Service.
  4. Click Add this Virtual Service.
  5. Configure the settings as recommended in the following table:

Section

Option

Value

Comments

Standard Options

Persistence Mode

Active Cookie

 
 

Timeout

1 Hour

 
 

Cookie name

JSESSSIONID

 
 

Scheduling Method

least connection

 
 

Idle Connection Timeout

900

 

SSL Properties

SSL Acceleration

Enabled

 
 

Cipher Set

Best Practices

 

Advanced Properties

Add a Port 80 Redirector VS

https://%h%s

Click Add HTTP Redirector. This automatically creates a redirect on port 80.

Table 4‑4: Apache HTTPS Re0-encrypt Recommended Settings

  1. Add the Real Servers:

a)Expand the Real Servers section.

b)Click Add New.

c)Enter the address of the relevant Real Server.

d)Complete the other fields as required.

e)Click Add this Real Server then click OK to the pop-up message.

f)Repeat the steps above to add more Real Servers as needed, based on your environment.

Create an Apache HTTPS Re-encrypt Redirect Virtual Service

Clicking the Add HTTP Redirector button automatically creates a port 80 redirect Virtual Service. This is optional, but the purpose of this Virtual Service is to redirect any clients who have connected using HTTP to the HTTPS Virtual Service. KEMP also recommends changing the Real Server Check Method and Persistence Mode to None.

References

Unless otherwise specified, the following documents can be found at http://kemptechnologies.com/documentation.

Virtual Services and Templates, Feature Description

Document History

Date

Change

Reason for Change

Version

Resp.

Oct 2016

Initial draft

First release

1.0

POC

Was this article helpful?

0 out of 0 found this helpful

Comments