A
A
arruah2018-08-03 08:41:27
HAproxy
arruah, 2018-08-03 08:41:27

How to set up ssl in haproxy for multiple sites?

There is a server with ESXi 6.7 installed, it has a vm with a public ip on which haproxy is installed, followed by a vm on which docker containers with websites are spinning.
The task is to configure haproxy so that when requesting via https, these web pages. Certificates are managed by haproxy, from which, inside the private network, requests go via http to the machine on which the web servers are located.
When you try to specify certificates for each instance in the config, requests go only to the first specified certificate, below the list the browser rejects as invalid. I am attaching the haproxy
config .

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
arruah, 2018-08-03
@arruah

This solution helped .

E
Eugene, 2018-08-03
@yellowmew

specify the folder with certificates in the frontend config.
something like
frontend fe_main
bind *: 443 ssl crt /etc/haproxy/crt
The /etc/haproxy/crt folder should contain certificate files with the full chain and private key at this point)
Certificates will be processed in the sort order of files: if you have two certificate files for one domain, but one file is named domain.name.pem and the second is www.domain.name.pem, then the first one for the site domain.name will always work

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question