I am attempting to get a certificate issued to a machine running Apache and Web Help Desk from Solarwinds.
When I issue
'sudo certbot --apache'
I get back
'Unable to find a virtual host listening on port 80 which is currently needed for Certbot to prove to the CA that you control your domain. Please add a virtual host for port 80.'
But I'm struggling to understand what is wrong. It seems to be asking me to add a new virtual host in the Apache config, but why?
If I give Certbot it's own vhost, what does that achieve? I'm guessing I'd still have to manually copy the certs when they are renewed......
Thank you for your reply. I’m still struggling to understand this.
I’ve said ‘why do this method of obtaining a cert require a V-host to be setup’ and you’ve pretty much answered ‘because it does’
I’m not trying to be critical, but here’s why I asked the question- I’ll try to be clearer (and the documentation doesn’t mention this directly.
My server at ‘support.xxxx.com.au’ is already up and running on port 80, and has it’s document root at
/Library/WebHelpDesk/bin/webapps/helpdesk
It’s running Apache, and I’m trying to work out why I am getting this error.
So if V-hosts is required-
can I set it up so that it doesn’t interfere with my existing install?
As I understand it, Certbot's Apache plugin relies on the presence of virtual hosts to understand how your websites are split up and how to apply configuration changes to individual sites.
In my previous example, if you tried to run Certbot against such an Apache configuration, it would surely complain:
Unable to find a virtual host listening on port 80 which is currently needed for Certbot to prove to the CA that you control your domain. Please add a virtual host for port 80.
However, this can easily be addressed by re-forming that piece of configuration as a virtual host:
With this variant, Certbot is able to understand your Apache configuration and do its job in issuing and installing a certificate.
I believe it is has been a best practice for some time to configure all websites as name-based virtual hosts. Most Linux distributions configure their Apache packages by default using virtual hosts.