sudo apt-get install python-letsencrypt-apache
letsencrypt --apache
nano /etc/apache2/apache2.conf
<VirtualHost *:443> SSLEngine on SSLCertificateKeyFile /etc/letsencrypt/live/dl.mhdr.ir/privkey.pem SSLCertificateFile /etc/letsencrypt/live/dl.mhdr.ir/cert.pem SSLCertificateChainFile /etc/letsencrypt/live/dl.mhdr.ir/chain.pem DocumentRoot "/var/www/html/dl" ServerName dl.mhdr.ir </VirtualHost>
service apache2 restart
PPA
$ sudo add-apt-repository ppa:certbot/certbot $ sudo apt-get update $ sudo apt-get install python-certbot-apache
note : only the last VitualHost will be detected by letsencrypt
References
https://certbot.eff.org/#ubuntuxenial-apache
https://www.digitalocean.com/community/tutorials/how-to-use-apache-http-server-as-reverse-proxy-using-mod_proxy-extension
https://letsencrypt.org/