- hostname cloud.xxx.com - nano /etc/hosts yum install epel-release yum install certbot python2-certbot-apache mod_ssl -y nano /etc/httpd/conf.d/cloud.conf <VirtualHost *:80> ServerAdmin hendro@xxx.com DocumentRoot "/var/www/html/nextcloud" ServerName cloud.xxx.com ErrorLog "/var/log/httpd/test.error_log" CustomLog "/var/log/httpd/test.access_log" common </VirtualHost> certbot --apache -d cloud.xxx.com certbot --apache yum install cronie -y crontab -e Let’s Encrypt recommends the automatic renew cronjob to run twice a day, to do that add the following line and then save and exit the crontab: * */12 * * * /usr/bin/certbot renew >/dev/null 2>&1 nano /etc/htppd/conf/httpd.conf <IfModule mod_headers.c> Header always add Strict-Transport-Security "max-age=15768000; includeSubDomains; preload" </IfModule> systemctl restart httpd sumber :How to install Let’s Encrypt on CentOS 7 with Apachehttps://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-centos-7
(Visited 109 times, 1 visits today)