I can't issue certificates for source build nginx 1.24.
I have a hosting and source build nginx.
Certbot 2.8.0
Ubuntu 22.04
nginx/1.24.0 - compiled NGINX Open Source from source
Domain: ambientwhispersmedia.com
Hosting provider: Digital Ocean
I can login to a root shell on my machine: yes
I'm using a control panel to manage my site: no
I used instructions from nginx.com website: Installing NGINX Open Source | NGINX Documentation
Nginx configuration options:
./configure
--user=nginx
--group=nginx
--with-pcre=../pcre2-10.42
--with-zlib=../zlib-1.3
--with-http_ssl_module
--with-http_v2_module
--with-stream
--with-http_auth_request_module
--without-http_empty_gif_module
--add-module=../ngx_brotli
My paths to nginx files in the result:
nginx path prefix: "/usr/local/nginx"
nginx binary file: "/usr/local/nginx/sbin/nginx"
nginx modules path: "/usr/local/nginx/modules"
nginx configuration prefix: "/usr/local/nginx/conf"
nginx configuration file: "/usr/local/nginx/conf/nginx.conf"
nginx pid file: "/usr/local/nginx/logs/nginx.pid"
nginx error log file: "/usr/local/nginx/logs/error.log"
nginx http access log file: "/usr/local/nginx/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"
======
STEP ONE - Everything is okey
snap install core
Result:
core 16-2.60.4 from Canonical✓ installed
snap refresh core
Result:
snap "core" has no updates available
snap install --classic certbot
Result:
certbot 2.8.0 from Certbot Project (certbot-eff✓) installed
ln -s /snap/bin/certbot /usr/bin/certbot
======
STEP TWO with errors
I am installing certbot to have SSL sertificate:
certbot --nginx -d ambientwhispersmedia.com -d www.ambientwhispersmedia.com
Error:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
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.")
Second try:
sudo certbot certonly --nginx -d ambientwhispersmedia.com -d www.ambientwhispersmedia.com
Error:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
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.")
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
Third try:
certbot certonly --nginx --nginx-server-root=/usr/local/nginx -d ambientwhispersmedia.com -d www.ambientwhispersmedia.com
Error:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
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.")
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
I asked for logs: tail /var/log/letsencrypt/letsencrypt.log
Output:
File "/snap/certbot/3566/lib/python3.8/site-packages/certbot/_internal/main.py", line 1581, in certonly
installer, auth = plug_sel.choose_configurator_plugins(config, plugins, "certonly")
File "/snap/certbot/3566/lib/python3.8/site-packages/certbot/_internal/plugins/selection.py", line 256, in choose_configurator_plugins
diagnose_configurator_problem("authenticator", req_auth, plugins)
File "/snap/certbot/3566/lib/python3.8/site-packages/certbot/_internal/plugins/selection.py", line 374, in diagnose_configurator_problem
raise errors.PluginSelectionError(msg)
certbot.errors.PluginSelectionError: 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.")
2023-12-18 03:12:38,357:ERROR:certbot._internal.log: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.")