Virtualhost not able to be selected - Can’t install certificate on my website

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: nicksnotion.com

I ran this command: sudo certbot --apache

It produced this output: The selected vhost would conflict with other HTTPS VirtualHosts within Apache. Please select another vhost or add ServerNames to your configuration.
VirtualHost not able to be selected.

My web server is (include version): apache

The operating system my web server runs on is (include version): debian 10

My hosting provider, if applicable, is: Google cloud

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 version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): 2.6.0

Hi @Nikhil1, and welcome to the LE community forum :slight_smile:

Apache is notorious for operating at all costs.
This can sometimes lead to "bad configurations" being overlooked.
I suspect that there is something that must be corrected before everything can work as expected.
Please show the output of:
sudo apachectl -t -D DUMP_VHOSTS

5 Likes


Here is the output

Where the HTTP vhost that covers the domain?:

There is only one HTTP vhost shown:
image
[and it ends with a TLD that is NOT going to get you a publicly trusted cert]

4 Likes

What should I do now to get the SSL certificate?

The Certbot --apache plug-in is looking for a VirtualHost with a ServerName or ServerAlias that includes the public domain name.

I am not sure what your goal is but you might try adding your domain nicksnotion.com as a ServerAlias in both of those VirtualHost config files.

5 Likes

I really have to write a FAQ document about this!

7 Likes

That might be a good idea!

5 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.