Install SSL (Let’sEncrypt) certificate on VPS
In some cases, when you try to install Let’sEncrypt SSL certificate on website in order to turn on the HTTPS:// , you might use the certbot package to do that. However, in some cases people get the error during setup:
Could not reverse map the HTTPS VirtualHost to the original ... Unable to install the certificate
The problem (as it says) means that the server doesn’t have any HTTPS virtualhost config directives for the target domain-name. So, these steps might help (note, change all occurences of
example.com with your domain):
/etc/apache/sites-available/with this content
my-site-ssl.conftoo, with this content
- In terminal/ssh, type:
systemctl restart apache2
- try to install certbot again with same command you did.
That might work for some people.
if these steps will not work, you might also try at step
and at step 5, in
my-site-ssl.conf uncomment the hinted lines and restart apache again.