Trying to renew with Apache2, should be Nginx

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. https://crt.sh/?q=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: www.odysseytours.nz

I ran this command: sudo certbot renew

It produced this output:sudo certbot renew
Saving debug log to /var/log/letsencrypt/letsencrypt.log


Processing /etc/letsencrypt/renewal/mail.odysseytours.nz.conf


Cert not yet due for renewal


Processing /etc/letsencrypt/renewal/odysseytours.nz.conf


Cert is due for renewal, auto-renewingā€¦
Error while running apache2ctl configtest.
Action ā€˜configtestā€™ failed.
The Apache error log may have more information.

/usr/sbin/apache2ctl: 198: /usr/sbin/apache2ctl: /usr/sbin/apache2: not found

Could not choose appropriate plugin: The apache plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError(ā€œError while running apache2ctl configtest.\nAction ā€˜configtestā€™ failed.\nThe Apache error log may have more information.\n\n/usr/sbin/apache2ctl: 198: /usr/sbin/apache2ctl: /usr/sbin/apache2: not found\nā€,)
Attempting to renew cert (odysseytours.nz) from /etc/letsencrypt/renewal/odysseytours.nz.conf produced an unexpected error: The apache plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError(ā€œError while running apache2ctl configtest.\nAction ā€˜configtestā€™ failed.\nThe Apache error log may have more information.\n\n/usr/sbin/apache2ctl: 198: /usr/sbin/apache2ctl: /usr/sbin/apache2: not found\nā€,). Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/odysseytours.nz/fullchain.pem (failure)


The following certs are not due for renewal yet:
/etc/letsencrypt/live/mail.odysseytours.nz/fullchain.pem expires on 2019-02-19 (skipped)
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/odysseytours.nz/fullchain.pem (failure)


1 renew failure(s), 0 parse failure(s)

My web server is (include version): nginx/1.14.0 (Ubuntu)

The operating system my web server runs on is (include version): Ubuntu server 18.04

My hosting provider, if applicable, is:

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):Cinnamon desktop installed

I do not have Apache2 installed so dont understand why it is trying to renew with Apache2.
Does anyone know where the switch is to make it renew with Nginx?
Thank you.

Probably because you used to use Apache at some point in the past. I do not think there is any way it would do this on its own.

grep -R apache /etc/letsencrypt/renewal/

You can try:

certbot renew --cert-name odysseytours.nz --nginx

If you run it this way, it will permanently save the selection.

1 Like

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