Installasi Let’s Encrypt Untuk LPSE di Centos 7

Tambah di file /etc/httpd/conf/httpd.conf

<VirtualHost *:80>
LogLevel warn
CustomLog /var/log/httpd/access.log combined
ServerAdmin helpdesk@gmail.com
DocumentRoot /var/www/html
ErrorLog /var/log/httpd/error.log
CustomLog /var/log/httpd/access.log combined
RewriteEngine on
RewriteCond %{SERVER_NAME} =example.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

sudo systemctl start httpd
sudo yum install epel-release
sudo yum install mod_ssl python-certbot-apache
sudo certbot --apache -d example.com -d www.example.com

Ubah file /etc/httpd/conf.d/ssl.conf

#SSLCertificateFile /etc/pki/tls/certs/localhost.crt
#SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
ServerName example.com
Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains;
SSLCertificateFile /etc/letsencrypt/live/example.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateChainFile /etc/letsencrypt/live/example.com/chain.pem

Lanjutkan …

sudo systemctl restart httpd
sudo crontab -e
0 2 * */2 * /usr/bin/certbot renew >> /var/log/le-renew.log

Silahkan uji SSL LPSE Anda di https://www.ssllabs.com/ssltest/

yihuiii….

One thought on “Installasi Let’s Encrypt Untuk LPSE di Centos 7”

Leave a Reply

Your email address will not be published. Required fields are marked *