I know this is kind of confusing, but the --apache
option does two different things, one of which is very helpful to you and one of which is very unhelpful to you.
The first thing we call -a apache
(the “authenticator”) which uses your webserver to obtain the certificate. This does not require an existing HTTP virtualhost with the associated servername (it just requires a working Apache configuration and for the DNS name to be pointed at this server).
The second thing we call -i apache
(the “installer”) which tries to reconfigure your webserver to install the certificate. This does require an existing HTTP virtualhost with the associated servername, which will be used as the basis for the new HTTPS virtualhost.
It seems from the output that the -a apache
step worked (as expected) but the -i apache
step failed (also as expected).
You would probably have better luck with
certbot certonly -a apache -d mail.smtp.co.uk
which would perform the working part and not perform the failing part.