# HTTPS requests not working via Load Balancer

**URL:** <https://discuss.konghq.com/t/https-requests-not-working-via-load-balancer/6254>\
**Category:** General\
**Tags:** kubernetes\
**Created:** [May 10, 2020, 10:19am UTC](https://discuss.konghq.com/t/https-requests-not-working-via-load-balancer/6254 "2020-05-10T10:19:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![danuka92](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@danuka92](https://discuss.konghq.com/u/danuka92)\
**Post date:** [May 10, 2020, 10:19am UTC](https://discuss.konghq.com/t/https-requests-not-working-via-load-balancer/6254/1 "2020-05-10T10:19:53Z")

</div>

Hi All,

My get a success response for my API requests made in HTTPS using the OpenShift route URL. But when the same API request is made through external load balancer (Haproxy) \> Kong \> OpenShift service flow, I get the below error response.

> HTTP/1.1 400 Bad Request  
> Date: Sun, 10 May 2020 09:58:59 GMT  
> Content-Type: text/html; charset=UTF-8  
> Content-Length: 220  
> X-Kong-Response-Latency: 0  
> Server: kong/2.0.2.0-enterprise-k8s
> 
> 400 The plain HTTP request was sent to HTTPS port
> # 400 Bad Request
> The plain HTTP request was sent to HTTPS port

My LB (Haproxy) configuration is,

> frontend ingress\_secure  
> bind \*:443 ssl crt /etc/haproxy/cert/haproxy.pem  
> mode http  
> acl has\_nsb\_uri path\_beg /nsb  
> use\_backend kong\_secure\_backend if has\_nsb\_uri  
> default\_backend ingress\_secure\_backend
> 
> backend kong\_secure\_backend  
> balance roundrobin  
> mode http  
> server external-infra1 172.55.49.33:30008 check  
> server external-infra2 172.55.49.34:30008 check

My Ingress resource configuration is,

> [root@server ~]# oc describe ingress httplistener  
> Name: httplistener  
> Namespace: nsb-mobile  
> Address: 172.30.22.2  
> Default backend: default-http-backend:80 ()  
> Rules:  
> Host Path Backends
> 
> * * *
> 
> ```
> /nsb/api/service httplistener:8080 (172.28.34.102:8080)
> 
> ```
> 
> Annotations:  
> [konghq.com/https-redirect-status-code:](http://konghq.com/https-redirect-status-code:) 302  
> [konghq.com/protocols:](http://konghq.com/protocols:) https  
> [kubectl.kubernetes.io/last-applied-configuration:](http://kubectl.kubernetes.io/last-applied-configuration:) {“annotations”:{“[konghq.com/strip-path":false},“apiVersion”:“extensions/v1beta1”,“kind”:“Ingress”,“metadata”:{“annotations”:{},“name”:“httplistener”},“spec”:{“rules”:[{“http”:{“paths”:[{“backend”:{“serviceName”:“httplistener”,“servicePort”:8080},“path”:"/nsb/api/service](http://konghq.com/strip-path%22:false%7D,%22apiVersion%22:%22extensions/v1beta1%22,%22kind%22:%22Ingress%22,%22metadata%22:%7B%22annotations%22:%7B%7D,%22name%22:%22httplistener%22%7D,%22spec%22:%7B%22rules%22:%5B%7B%22http%22:%7B%22paths%22:%5B%7B%22backend%22:%7B%22serviceName%22:%22httplistener%22,%22servicePort%22:8080%7D,%22path%22:%22/nsb/api/service)”}]}}]}}
> 
> Events:

Can you help me resolve this issue.

Thanks!

---

<div class="post-metadata">

**Author:** ![hbagdi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/hbagdi/32/562_2.png) [@hbagdi](https://discuss.konghq.com/u/hbagdi)\
**Post date:** [May 12, 2020, 7:48pm UTC](https://discuss.konghq.com/t/https-requests-not-working-via-load-balancer/6254/2 "2020-05-12T19:48:02Z")

</div>

Please open an enterprise support ticket for speedy resolution.

> [@danuka92](#):
>
> But when the same API request is made through external load balancer (Haproxy) \> Kong \> OpenShift service flow, I get the below error response.

It seems like HA proxy is sending plaintext requests to the https port of Kong.  
You either need to configure HA proxy to send HTTPS requests to the HTTPS port of Kong or configure HA proxy to send requests to the HTTP(plaintext) port of Kong.

---

<div class="post-metadata">

**Author:** ![danuka92](https://avatars.discourse-cdn.com/v4/letter/d/a8b319/32.png) [@danuka92](https://discuss.konghq.com/u/danuka92)\
**Post date:** [May 18, 2020, 2:00pm UTC](https://discuss.konghq.com/t/https-requests-not-working-via-load-balancer/6254/3 "2020-05-18T14:00:19Z")

</div>

This error got resolved with ‘ssl verify none’ config for Kong ingress endpoint. But this is with SSL termination in the load balancer.

Appreciate if someone can share the configuration in HA proxy and Kong for haproxy SSL pass-through with SSL termination at Kong ingress controller.

Thanks!

---

<div class="post-metadata">

**Author:** ![hbagdi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/hbagdi/32/562_2.png) [@hbagdi](https://discuss.konghq.com/u/hbagdi)\
**Post date:** [May 18, 2020, 5:58pm UTC](https://discuss.konghq.com/t/https-requests-not-working-via-load-balancer/6254/4 "2020-05-18T17:58:49Z")

</div>

> [@danuka92](#):
>
> Appreciate if someone can share the configuration in HA proxy and Kong for haproxy SSL pass-through with SSL termination at Kong ingress controller.

From this additional information, it seems like you need to configure HA proxy to send HTTPS requests to the HTTPS port of Kong. And that should be about it.
