Configuring SSL/TLS Termination at HAProxy

Page last updated:

Pivotal recommends that you use HAProxy in lab and test environments only. Production environments should instead use a highly-available customer-provided load balancing solution.

CF deploys with a single instance of HAProxy for use in lab and test environments. You can use this HAProxy instance for SSL termination and load balancing to the PCF Routers.

You can generate a self-signed certificate for HAProxy if you do not want to obtain a signed certificate from a well-known certificate authority.

Terminate SSL/TLS at HAProxy

To use the HAProxy load balancer, you must create a wildcard A record in your DNS and configure some fields in the Elastic Runtime product tile.

  1. Create an A record in your DNS that points to the HAProxy IP address. The A record associates the System Domain and Apps Domain that you configure in the Domains section of the Elastic Runtime tile with the HAProxy IP address.

    For example, with as the main subdomain for your Cloud Foundry (CF) deployment and an HAProxy IP address, you must create an A record in your DNS that serves and points *.cf to

    Name Type Data Domain
    *.cf A
  2. Use the Linux host command to test your DNS entry. The host command should return your HAProxy IP address.


    $ host has address
    $ host has address

In PCF, perform the following steps to configure SSL termination on HAProxy:

  1. Navigate to the Ops Manager Installation Dashboard.

  2. Click the Elastic Runtime tile in the Installation Dashboard.

  3. Click Networking.

  4. For PCF deployments on OpenStack or vSphere, enter the HAProxy IP address that you used to set up a wildcard DNS record in the HAProxy IPs field. For more information, see the Elastic Runtime networking configuration topic for OpenStack or vSphere. For PCF deployments on AWS or Azure, leave the HAProxy IP address blank.

  5. Under Select one of the point-of-entry-options, select the third option, Forward SSL to HA Proxy.

  6. Enter your PEM-encoded certificate and your PEM-encoded private key in the fields under SSL Termination Certificate and Private Key. You can either upload your own certificate or generate a RSA certificate in Elastic Runtime. For options and instructions on creating a certificate for your wildcard domains, see Creating a Wildcard Certificate for PCF Deployments.

  7. If you want HAProxy to only allow HTTPS traffic, select Disable HTTP traffic to HAProxy.

  8. If you want to use a specific set of SSL ciphers for HAProxy, configure HAProxy SSL Ciphers. Enter a colon-separated list of custom SSL ciphers to pass to HAProxy. Otherwise, leave this field blank.

  9. If you expect requests larger than the default maximum of 16 Kbytes, enter a new value (in bytes) for Request Max Buffer Size. You may need to do this, for example, to support apps that embed large cookie or query string values in headers.

  10. If you are not using SSL encryption or if you are using self-signed certificates, you can select Disable SSL certificate verification for this environment. Selecting this checkbox also disables SSL verification for route services.

    Use this checkbox only for development and testing environments. Do not select it for production environments.

    Ert haproxy certs

  11. Complete the rest of the Networking configuration screen, and click Save.

  12. For PCF deployments on Azure or AWS, configure the HAProxy job in the Resource Config page of Elastic Runtime tile. For more information, see the Elastic Runtime installation instructions for Azure or AWS.

Create a pull request or raise an issue on the source for this page in GitHub