To generate a letsencrypt certificate without installing it into Apache, do:
# sudo certbot certonly --webroot \ --webroot-path /path_to_your_vhosts/www.domain1.com/htdocs -d www.domain1.com \ --webroot-path /path_to_your_vhosts/www.domain1.com/htdocs -d domain1.com # apache2ctl configtest
If the configtest does not detect any problems reload the Apache server:
# service apache2 reload
Reference
- How to Set Up Let’s Encrypt Certificates for Multiple Apache Virtual Hosts on Ubuntu 14.04
- Letsencrypt with webroot on Apache
- Letsencrypt (for WordPress sites)
- Certbot Users Guide
- Name-Based VirtualHosts and SSL
- Using Multiple SSL Certificates in Apache with One IP Address
Letsencrypt Certificate – Manual Install