Simple routing - change HTTP protocol to HTTPS protocol

Last Updated: Jun 26, 2017

Prerequisite

An HTTP domain name for access has been configured. For details, refer to Add domain names to services exposed to the public network.

Operating procedure

  1. HTTPS is supported at the Server Load Balancer layer. To support HTTPS, a Server Load Balancer certificate must be created.

    1. Log on to the Server Load Balancer console.
    2. Click Certificates on the left navigation pane and click Create Certificate in the upper-right corner.1
    3. Enter certificate information, and click Confirm.2
  2. After the certificate is successfully created, locate the Server Load Balancer instance that is assigned during cluster creation.

    When you create clusters, the Container Service assigns a Server Load Balancer instance to each cluster, and the instance belongs to you.

    1. On the Container Service console, click Clusters on the left navigation pane, select the corresponding cluster (the cluster routing-test-online is used as an example), and click Manage.
      5
    2. Click Load Balancer Settings and click Go to Server Load Balancer Console.
      6
      You can view the service address of the Server Load Balancer instance.
      7
  3. Click Listening in the left navigation pane and click Create Listener. In the Add Listener page, enter the following port information.

    1. +----------------+-------+------+
    2. | | Protocol | Port |
    3. +----------------+-------+------+
    4. | Front-end protocol (port) | HTTPS | 443 |
    5. +----------------+-------+------+
    6. | Backend protocol (port) | HTTP | 9080 |
    7. +----------------+-------+------+
    1. Select HTTPS for the frontend protocol.
    2. Set the frontend port to Port 443 and backend port to Port 9080. (Port 9080 is exposed by the routing service acsrouting_routing on each ECS host. All HTTP requests are forwarded based on the HOST HTTP header to corresponding containers that provide various services.)
    3. Select the preceding certificate www.example.com.
    4. Complete other settings based on your needs.
    5. Click Next Step.
      8
  4. Complete settings on the Health check page. Then click Confirm.

    You can select to disable or enable the health check. If you select to enable the health check, you have to enter your own domain name in Domain Name or enter /haproxy-monitor in Health Check Route; otherwise, the health check will be abnormal.

    9

  5. After the listener is successfully created and started, click Confirm.

  6. Access the page https://www.example.com.

Thank you! We've received your feedback.