DEV Community

Alejandro Bonilla
Alejandro Bonilla

Posted on

3 2

Install SSL certificate with Certbot in Centos 7

I'm a owner of HP ML110 Gen9 running CENTOS 7, with a ccTLD.
First you need a total configured services: named, httpd, firewalld. I don`t know if you need email with same domain to get the certificate, but configure postfix and dovecot.

Requirement 1:

You need a virtualhost, because certbot use your "domain.conf" (/etc/httpd/conf.d/domain.conf) for compare the configuration with this file.

Requirement 2:

-First install epel-release.

yum install epel-release.

-I don´t remember if you need utils, but go to install.

yum install yum-utils

Installing Certbot

Install Certbot

yum install certbot-apache

-Run Certbot

certbot --apache

Setting Cerbot

-It's intuitive for configure, email for notifications, type your domain: domain.com.sv, www.domain.com.sv and cerbot configure the redirect for your site; dont skip this step!!.

Requirement 3:

In my case certbot does not redirect well, maybe you need add this lines to .htaccess

RewriteEngine On
RewriteCond %{HTTP_HOST} domain.com.sv [NC]
RewriteCond %{HTTPS} off
RewriteRule .*$ https://%{HTTP_HOST}%{REQUEST_URI}

RewriteCond %{HTTP_HOST} domain.com.sv [NC]
RewriteCond %{HTTPS} off
RewriteRule .*$ https://%{HTTP_HOST}%{REQUEST_URI}

Requirement 4:

service httpd restart

I still don't configure the autorenew; and maybe you already know that I'm from El Salvador, reason for my bad english :(.

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)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay