I need to setup a new cert for a new domain on my linode VPS which has multiple domains on it right now using multiple Apache Virtual Host files. A few years ago I configured certs for a few of those domains but there were always problems …so now I’m asking in advance.
I note that when certbot runs and I ask for 443 redirection, it seems to create its own new apache virtual host file alongside of the existing one. Currently my existing one follows the standard pattern like this:
<VirtualHost *:80>
ServerAdmin admin@example.com
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/example.com/public_html
ErrorLog {APACHE_LOG_DIR}/error.log
CustomLog {APACHE_LOG_DIR}/access.log combined
(as described on this digitalocean page: https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts )
In the past I have manually modified the virtual host file to get the redirect to 443 …following the pattern outlined on this page:
https://cwiki.apache.org/confluence/display/HTTPD/RedirectSSL
However even after reading the letsencrypt documentation and going through the forum I still don’t understand the whole process. Specifically:
- If I’m asking certbot (at the time of creation) to take care of the redirect, do I still need to do the changes to the virtual host file as outlined in the above-mentioned apache document? Should I be doing this before or after running the certbot tool?
- Since certbot creates a new virtual host file alongside the old one, do I still need the old one?
Thank you,
Patrick