Puvox – Blog

[Solution] Could not reverse map the HTTPS VirtualHost to the original

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):

  1. Create my-site.conf in /etc/apache/sites-available/ with this content
  2. Create my-site-ssl.conf too, with this content
  3. In terminal/ssh, type:
    a2ensite my-site.conf
  4. Type:
    systemctl restart apache2
  5. 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 3 : a2ensite my-site-ssl.conf
and at step 5, in my-site-ssl.conf uncomment the hinted lines and restart apache again.


Exit mobile version