Why do I get this "Could not reverse map the HTTPS VirtualHost to the original" message when I try to install an SSL?

April 5, 2018 470 views
Apache LAMP Stack One-Click Install Apps Ubuntu 16.04

I'm trying to set up a vhosts file on my server with separate vhost txt files in it. Everything seems to work fine and I am able to reach both of the areas I try to set up using http. When I try to install an SSL cert however, it always comes up with a message telling me:

Could not reverse map the HTTPS VirtualHost to the original

IMPORTANT NOTES:
 - Unable to install the certificate
 - Congratulations! Your certificate and chain have been saved at:

I've tried reinstalling and restarting the droplet 3 times now and every time it is the same. I don't know what I'm doing wrong I'm new to all this. Could someone help point me in the right direction?

2 Answers

Are you familiar with the apache2 sites available folder?

Installing a cert for apache2 involves setting up the virtual host listening on 443. It's that config that needs to reference your certificate and chains and private key.

There are 2 default Apache 2 confs in sites available. One for clear port and one for ssl.

To be honest, not really. Okay so I think you're saying I need to include the bit from the default-ssl.conf file.

The only thing is that I thought that using

sudo certbot --apache -d example.com -d www.example.com

would add the bits I needed in the vhosts file and add the ssl version. I don't understand why i can't get this to work when I've seen it work before on other servers that I use.

Have another answer? Share your knowledge.