Skip to content

install certbot

manoj suryawanshi edited this page Oct 17, 2023 · 5 revisions

Install certBot

Ubuntu20/Ubuntu20

please follow below steps:

sudo apt update && sudo apt install certbot python3-certbot-apache
sudo certbot --apache -d installssl.com -d www.installssl.com
sudo systemctl status certbot.timer
sudo certbot renew --dry-run

suse

followed below steps:

sudo zypper -n install certbot
sudo certbot certonly --webroot -w /srv/www/htdocs -d manojs1978-concise-vulture.gluu.info
sudo cp /etc/apache2/vhosts.d/_https_jans.conf /etc/apache2/vhosts.d/_https_jans.conf_org
sudo vi /etc/apache2/vhosts.d/_https_jans.conf and modify below

change below :
SSLEngine on

SSLCertificateFile /etc/letsencrypt/live/manojs1978-concise-vulture.gluu.info/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/manojs1978-concise-vulture.gluu.info/privkey.pem

restart apache
sudo /usr/sbin/rcapache2 restart

RHEL

please follow below steps:

sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm 
sudo dnf install mod_ssl
sudo yum install certbot python3-certbot-apache 
sudo certbot certonly --apache 

if getting error

Error while running apachectl configtest.

AH00526: Syntax error on line 5 of /etc/httpd/conf.d/ssl.conf: Cannot define multiple Listeners on the same IP:port

solution : coment listen 443 in ssl.conf

Modify https_jans.conf file for SSLCertificateFile and SSLCertificateKeyFile values with certificate location which we got from certbot command execution.

 sudo vi /etc/httpd/conf.d/https_jans.conf
SSLCertificateFile location_of_fullchain.pem
SSLCertificateKeyFile location_of_privkey.pem
sudo service httpd restart
Clone this wiki locally