M
M
mr_blond972015-09-10 22:40:40
HAproxy
mr_blond97, 2015-09-10 22:40:40

How to setup ssl backend in haproxy?

There is a server with a website, a server with haproxy, a domain name and an ssl certificate. The certificate is located on the server with the site. How to configure ssl backend in this case, what to write in the haproxy config? Haproxy is needed in order to switch the site to a backup server in the event of a failure of the main server.
current haproxy config:

global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
user haproxy
group haproxy
daemon
defaults
log global
mode http
option httplog
option dontlognull
contimeout 5000
clitimeout 50000
srvtimeout 50000
errorfile 400 /etc/haproxy/errors/ 400.http
errorfile 403 /etc/haproxy/errors/403.http
errorfile 408 /etc/haproxy/errors/408.http
errorfile 500 /etc/haproxy/errors/500.http
errorfile 502 /etc/haproxy/errors/502. http
errorfile 503 /etc/haproxy/errors/503.http
errorfile 504 /etc/haproxy/errors/504.http
frontend tutorial_im
bind *:80
default_backend tutorial_http
backend tutorial_http
balance roundrobin
mode http
server web1 APISite:80 check
# server web1 backupserver API:80 check

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andre la'Balm, 2015-09-11
@grumblik

The certificate will have to be put on the HAP server and registered in the settings.
Here is an instruction suitable for the question.
https://serversforhackers.com/using-ssl-certificat...
If there are difficulties with translation or something else - write.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question