1. Home
  2. Accelerator
  3. Redirect port 80 to port 443 (HTTP to HTTPS)
  1. Home
  2. Balancer
  3. Redirect port 80 to port 443 (HTTP to HTTPS)
  1. Home
  2. Misc
  3. Redirect port 80 to port 443 (HTTP to HTTPS)

Redirect port 80 to port 443 (HTTP to HTTPS)

There are certain circumstances in which you might want to transparently pass traffic from one port to another. Quite typically for web apps, this may be the case if you are receiving plain text insecure requests on port 80 (HTTP) and you want those to be redirected to an SSL-secured connection on port 443 (HTTPS).

This HTTP to HTTPS redirection is something you can easily achieve with a Balancer group/frontend.

Step 1: Setup the Group

We will create an HTTP-Servers group and set it to listen on port 80.

Navigate to:

Balancer > Group Management

Click on the Add a Group tab, and enter your group details.

Give it a Name (e.g. HTTP-Servers) and set it to listen on Port Number 80.

Click on the Step 2 button at the bottom of the page.

Step 2: Set the Balance Method and Mode

Now it is time to configure the options for your HTTP-Servers group. You can edit these at a later stage, but take note of the various options and features as they can dramatically effect your balance group!

Under:

Standard Options sub-tab > Balance Options pane

Set Balance Method to Round-Robin, and set Balance Mode to HTTP (Layer 7).

Note: in Round-Robin balance method, each server is used in turns, according to their weights. This is the smoothest and fairest algorithm when the server’s processing time remains equally distributed. This algorithm is dynamic, which means that server weights may be adjusted on the fly for slow starts, for instance.

Step 3: Set the Redirects

We’ll now properly set the redirects from the HTTP to HTTPS schema.

Go under:

HTTP Options tab > Header Modification pane

And set Redirects to:

scheme https

Click on the Save button at the end of the page.

… and that’s it! You have redirected all traffic from port 80 (HTTP) to port 443 (HTTPS).

Updated on November 30, 2018


Was this article helpful?

Related Articles