I'm trying to install certbot on my digital ocean droplet. I'm using ubuntu 20.04 and following instructions from https://certbot.eff.org/lets-encrypt/ubuntufocal-nginx.
The error occurs when I run sudo certbot --nginx
. The error I get is:
The nginx plugin is not working; there may be problems with your existing configuration.
The error was: NoInstallationError("Could not find a usable 'nginx' binary.
Ensure nginx exists, the binary is executable, and your PATH is set correctly.")
This is my first time using digital ocean and such so please explain the solution. Thank you.
you can use options to specify the path to the 'nginx' binary and conf directory (it seems that certbot expects nginx.conf
file in nginx's installation directory if you do not specify it manually)
certbot certonly --nginx --nginx-ctl /usr/local/openresty/nginx/sbin/nginx --nginx-server-root /usr/local/openresty/nginx/conf