Wanting to be able to process requests over SSL, but not wanting to self-sign so that it’s easier on any visitors that come across here led me to find the Let’s Encrypt CertBot. CertBot has a neat little client that will automagically set up SSL with minimal input from you. However, I was running into the problem: we were unable to find a vhost with a Server name or address …
I was using an Apache webserver running a CentOS 6 install from DigitalOcean, although ultimately I don’t believe that this had any bearing on my problem. An abbreviated version of my VirtualHosts file looked something like this:
<VirtualHost *:80> DocumentRoot /var/www/html/popthestuff ServerName popthestuff.com ServerAlias www.popthestuff.com </VirtualHost> <virtualHost *:80> DocumentRoot /var/www/html/funplusplus ServerName funplusplus.com ServerAlias www.funplusplus.com </virtualHost> <virtualHost *:80> DocumentRoot /var/www/html/magicaljukebox ServerName magicaljukebox.com ServerAlias www.magicaljukebox.com </virtualHost> <virtualHost *:80> DocumentRoot /var/www/html/fatluis ServerName fatluis.com ServerAlias www.fatluis.com </virtualHost>
A quick google search led me to discover that the CertBot client can’t handle multiple vhosts in one file, that fix is easy enough. I split the vhosts into individual files, yet I was still running into an issue, only popthestuff was being detected by the client.
I noticed that there is a minor difference between my popthestuff vhost and all the other entries, the vhost tag. As it turns out, the certbot client is case-sensitive, so changing:
Is what allowed the client to run flawlessly for me. Hope this helps anyone else having the same problem!