Estou tentando fornecer SSL no HAProxy usando certbot
LetsEncrypt. Estou criando SSL com o comando:
sudo certbot certonly --standalone -d test.example.com \
--non-interactive --agree-tos --email [email protected] \
--http-01-port=8888
Está criando um novo certificado. Não há problema. Mas se eu quiser renovar o certificado, a renovação falhará. Quando eu corro sudo certbot renew --dry-run
. Dando esse erro:
Processing /etc/letsencrypt/renewal/test.example.com.conf
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cert not due for renewal, but simulating renewal for dry run
Plugins selected: Authenticator standalone, Installer None
Simulating renewal of an existing certificate for test.example.com
Performing the following challenges:
http-01 challenge for test.example.com
Cleaning up challenges
Failed to renew certificate test.example.com with error: Problem binding to port 8888: Could not bind to IPv4 or IPv6.
Estou usando esta fonte: https://serversforhackers.com/c/letsencrypt-with-haproxy
Estou criando minha configuração haproxy ( HA-Proxy versão 2.2.9-2+deb11u6 ) assim:
frontend fe-example
bind *:4433 ssl crt /etc/haproxy/certs/test.example.com/test.example.com.pem
# New line to test URI to see if its a letsencrypt request
acl letsencrypt-acl path_beg /.well-known/acme-challenge/
use_backend letsencrypt-backend if letsencrypt-acl
default_backend be-example
# LE Backend
backend letsencrypt-backend
server letsencrypt 127.0.0.1:8888
# Normal (default) Backend
# for web app servers
backend be-example
# Config omitted here
Mas essa configuração não funciona comigo.
Minha primeira pergunta é; o que há de errado nesta configuração do HAProxy? Minha segunda pergunta é; este método para fornecer certificado SSL é verdadeiro?