# Mixed content loaded over HTTPS with HAProxy after adding SSL Cert

**URL:** https://forums.suse.com/t/mixed-content-loaded-over-https-with-haproxy-after-adding-ssl-cert/5567
**Category:** Rancher 1.x
**Created:** [February 16, 2017, 10:47pm UTC](https://forums.suse.com/t/mixed-content-loaded-over-https-with-haproxy-after-adding-ssl-cert/5567 "2017-02-16T22:47:00Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![occasl](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/occasl/32/2168_2.png) [@occasl](https://forums.suse.com/u/occasl)
#### Post date: [February 16, 2017, 10:47pm UTC](https://forums.suse.com/t/mixed-content-loaded-over-https-with-haproxy-after-adding-ssl-cert/5567/1 "2017-02-16T22:47:00Z")

</div>

I’m getting the following error after adding an SSL Cert to my haproxy configuration:

```auto
Mixed Content: The page at 'https://rancher.abc.com/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://rancher.abc.com/v2-beta/identities?limit=-1&sort=name'. This request has been blocked; the content must be served over HTTPS.

```

I’ve tried multiple things to workaround this. Any ideas why this is happening? Pertinent information below

Rancher Versions:

CATTLE\_DB\_CATTLE\_DATABASE=mysql  
CATTLE\_DB\_CATTLE\_MYSQL\_HOST=localhost  
CATTLE\_DB\_CATTLE\_MYSQL\_NAME=cattle  
CATTLE\_DB\_CATTLE\_MYSQL\_PORT=3306  
CATTLE\_DB\_CATTLE\_USERNAME=cattle  
CATTLE\_GRAPHITE\_HOST=  
CATTLE\_GRAPHITE\_PORT=  
CATTLE\_HOME=/var/lib/cattle  
CATTLE\_HOST\_API\_PROXY\_MODE=embedded  
CATTLE\_LOGBACK\_OUTPUT\_GELF\_HOST=  
CATTLE\_LOGBACK\_OUTPUT\_GELF\_PORT=  
CATTLE\_RANCHER\_CLI\_VERSION=v0.4.1  
CATTLE\_RANCHER\_COMPOSE\_VERSION=v0.12.2  
CATTLE\_RANCHER\_SERVER\_IMAGE=rancher/server  
CATTLE\_RANCHER\_SERVER\_VERSION=v1.4.0  
CATTLE\_USE\_LOCAL\_ARTIFACTS=true

Docker Version:  
1.2.5

OS version:  
CentOS Linux release 7.3.1611 (Core) on VMWare

Setup Details:  
Single node rancher

Environment Type:  
Cattle

# Steps to Reproduce

First run:

`sudo docker run -d --restart=unless-stopped --name=rancher-server -v /data/rancher:/var/lib/rancher -p 127.0.0.1:8080:8080 rancher/server`

Install HA-Proxy version 1.5.18 2016/05/10 and configure access over HTTP

Open web console and configure LDAP connectivity successfully

Update haproxy.cfg to allow SSL:

```auto
global
  maxconn 4096
  ssl-server-verify none

defaults
  mode http
  balance roundrobin
  option redispatch
  option forwardfor

  timeout connect 5s
  timeout queue 5s
  timeout client 36000s
  timeout server 36000s

frontend http-in
  mode tcp
  bind *:443 ssl crt /etc/haproxy/rancher-cert.pem
  default_backend rancher_servers

  acl is_websocket hdr(Upgrade) -i WebSocket
  acl is_websocket hdr_beg(Host) -i ws
  use_backend rancher_servers if is_websocket

backend rancher_servers
  server websrv1 127.0.0.1:8080 weight 1 maxconn 1024

```

Restart haproxy and attempt to login again resulting in aforementioned error.
