DEV Community

JPBlancoDB
JPBlancoDB

Posted on

3

Configurando LetsEncrypt con Apache en Debian

Siguiendo con el post LetsEncrypt en Nginx vamos a ver como configurarlo con Apache en Debian.

  1. Instalamos certbot en el servidor:
echo 'deb http://ftp.debian.org/debian jessie-backports main' | sudo tee /etc/apt/sources.list.d/backports.
sudo apt-get update
sudo apt-get install python-certbot-apache -t jessie-backports
Enter fullscreen mode Exit fullscreen mode
  1. Configuramos el ServerName de Apache
sudo nano /etc/apache2/sites-available/000-default.conf
Enter fullscreen mode Exit fullscreen mode

Tener en cuenta que 000-default.conf es la configuración por defecto de Apache pero si tienen otro archivo de configuración, deben configurar el ServerName y ServerAlias según corresponda dentro del tag

    ServerName dominio.com
    ServerAlias www.dominio.com
Enter fullscreen mode Exit fullscreen mode
  1. Reiniciamos Apache:
sudo systemctl restart apache2
Enter fullscreen mode Exit fullscreen mode
  1. Configuramos el firewall:

Ejemplo ufw:

sudo ufw allow 'WWW Full'
Enter fullscreen mode Exit fullscreen mode

Ejemplo iptables:

sudo iptables -I INPUT -p tcp --dport 443 -j ACCEPT
Enter fullscreen mode Exit fullscreen mode
  1. Generamos el certificado con certbot:
sudo certbot --apache
Enter fullscreen mode Exit fullscreen mode

Listo! Ya tenemos configurado nuestro certificado con LetsEncrypt y Apache. Recuerden que el certificado hay que renovarlo, para ver el instructivo de como se configura la renovación automática pueden verlo en el paso 5) de Configurando LetsEncrypt con Nginx en Ubuntu.

Cualquier duda o consulta no duden en dejar sus comentarios o bien me pueden consultar vía Twitter.

Saludos!

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay