HAProxy https with Let’s Encrypt SSL

By | 2021년 9월 12일
Table of Contents

HAProxy https with Let’s Encrypt SSL

참조

참조

참조

HAProxy 용 인증서 생성

cat /ssl/fullchain.pem /ssl/privkey.pem | tee /ssl/ssl.pem

HAProxy 설정

frontend haproxy
    bind 123.123.123.123:8443 ssl crt /ssl/ssl.pem

    mode http
    default_backend test_site

    acl letsencrypt-acl path_beg /.well-known/acme-challenge/
    use_backend letsencrypt-backend if letsencrypt-acl

backend test_site
    mode http
    server test_site1 10.0.51.11:80 check inter 5s rise 3 fall 2
    server test_site2 10.0.51.12:80 check backup inter 5s rise 3 fall 2

backend letsencrypt-backend
    server letsencrypt 123.123.123.123:8443

backend 가 두개이다.
하나는 도메인 사이트용이고, 또하나는 ACME 프로토콜용이다.
123.123.123.123:8443 이 접속하는 URL 과 같다.

https 갱신

HAProxy 2.1 (Nov 2019) 이후 HAProxy 의 재실행 없이도 인증서가 갱신된다.

답글 남기기