I am trying to set up an reverse proxy. The certificates for my domain are already generated. But when I try to install them, it can´t seem to find my vhost:
certbot --apache -d mydomain
What would you like to do?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: Attempt to reinstall this existing certificate
2: Renew & replace the cert (limit ~5 per 7 days)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 1
Keeping the existing certificate
We were unable to find a vhost with a ServerName or Address of mydomain
Which virtual host would you like to choose?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: 000-default-le-ssl.conf | seconddomain | HTTPS | Enabled
2: 000-default.conf | | | Enabled
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
No vhost exists with servername or alias of mydomain. No vhost was selected. Please specify ServerName or ServerAlias in the Apache config.
No vhost selected
IMPORTANT NOTES:
- Unable to install the certificate
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/mydomain/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/mydomain/privkey.pem
Your cert will expire on 2021-02-24. To obtain a new or tweaked
version of this certificate in the future, simply run certbot again
with the "certonly" option. To non-interactively renew *all* of
your certificates, run "certbot renew"
I am running apache 2.25 on raspian 10 with LE 0.31. Seconddomain is the domain already running on the server. Vhost configuration:
This seems to block all external access.
Unless, since it is the only thing on port 80, it is the default and would be served to all unmatched requests.
Either way it seems to NOT be doing what you would expect.
Ok so the only thing failing is when you try to reinstall a cert that is already installed.
Yes, that should work and it doesn't - but is it really needed?
Something must have changed in your config since certbot first installed the cert and now it doesn't know how to.
But do you really even need that? NO.
You only need to renew the cert when it comes time.
You could change from: certbot --apache -d domain
to just certbot renew
and see how that goes.
I never installed the certs for argoniannextcloud because it couldn´t find my vHost. That is my problem here. There is nothing wrong with the certs per se, I think.