Configuração de Certificados SSL

🔒 Configuração HTTPS

Let's Encrypt (Recomendado)

1. Instalação do Certbot

# Ubuntu/Debian
sudo apt install certbot

# CentOS/RHEL
sudo yum install certbot

2. Geração do Certificado

sudo certbot certonly --standalone -d api.paymentgateway.com

3. Renovação Automática

# Adicionar ao crontab
0 12 * * * /usr/bin/certbot renew --quiet

Certificado Auto-assinado (Desenvolvimento)

# Gerar chave privada
openssl genrsa -out private.key 2048

# Gerar certificado
openssl req -new -x509 -key private.key -out certificate.crt -days 365

Configuração no Express

NGINX com SSL


Documentação atualizada: December 2024

Last updated

Was this helpful?