Hi all, this is my first time installing a Let’s Encrypt SSL cert and I’ve hit a snag. I’m installing on a Wordpress site by following this DigitalOcean guide. I’ve gotten to step 2 and have run into my issue.
I am trying to install a single cert for both the “example.com” and “www.example.com” domains. However, I’ve been hit with this message. I don’t know where to go from here and am in need of assistance. Thanks!
My domain is: (prefer not to disclose)
I ran this command: sudo letsencrypt --apache -d example.com -d www.example.com
It produced this output: IMAGE HERE We were unable to find a vhost with a ServerName or Address of www.example.com. Which virtual host would you like to choose? x1 000-default.conf | | x2 default-ssl.conf | | HTTPS x3 000-default-le-ssl.conf | example.com | HTTPS
My operating system is (include version): Ubuntu 16.04 LTS
My web server is (include version): Apache2 running Wordpress
My hosting provider, if applicable, is: DigitalOcean
I can login to a root shell on my machine (yes or no, or I don’t know): Yes
I’m using a control panel to manage my site (no, or provide the name and version of the control panel): No
The main apache config files for your sites are usually in /etc/apache2/sites-available. Exactly how you copy and paste them depends on what OS you are running on. It’s probably easier to copy them to your local machine *by the same method you’d normally copy files between your local machine and the server ), then open them up in a plain text editor, so you can copy and paste them via your browser into pastebin.com.
You don't have the domain name defined within the configs.
There are 2 options.
You could use the "webroot" option, rather than "apache" - which will mean you can obtain the cert, however letsencrypt will not edit your config and add the cert definitions in there manually.
You need to define the server name and server alias