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. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.
Hint: The Certificate Authority failed to verify the temporary nginx configuration changes made by Certbot. Ensure the listed domains point to this nginx server and that it is accessible from the internet.
My web server is (include version): nginx version: nginx/1.18.0 (Ubuntu)
The operating system my web server runs on is (include version):
Canonical:0001-com-ubuntu-server-focal:20_04-lts-gen2:latest
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
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):
certbot 2.9.0
thank you for fast response on this. Is there any way to get some valid authz in place without the standalone command in between?
What i need to say is, that nginx is configured to redirect http to https and i am wondering if this could cause the --nginx command failing, but should not, according to:
" It only accepts redirects to “http:” or “https:”, and only to ports 80 or 443".
No problem at all currently, it works all es expected. The issue i would llike to get rid of, is the error i get when i try to get certificates installed by executing initially "certbot --nginx..." - command. This will fail, until i execute "certbot certonly..." - command. So, to get --nginx command working and config maintained by certbot, i need to execute the certonly command previously. I would like to avoid this, if possible...
Most people with nginx issues are due to certbot not being able to parse the config files or handle them correctly. That doesn't seem to be the case here - those errors are typically raised before authorization is attempted.
IMHOW, the issue is likely due to your nginx config for the http and https sections. if you can share as much of those blocks as possible, someone may see the issue.
If you can't get this config running, an alternative approach is to do the following:
1- configure nginx to proxypass the acme-challenge directory to an alternate port, like 8080
2- run the certbot certonly standalone option but bind it to the above identified port, e.g. --http-01-port=8080
If you run that server on 8080, then you can work on the nginx configuration until you're able to correctly reach the acme-challenge paths on port 80 through the proxypass.
Once nginx is installed, copy the nginx configuration file provided by NetBox to /etc/nginx/sites-available/netbox. Be sure to replace netbox.example.com with the domain name or IP address of your installation. (This should match the value configured for ALLOWED_HOSTS in configuration.py.)
That is highly unusual to need to run certonly with pre/post hooks before --nginx
When you tried running command #2 with --nginx earlier was nginx running?
There is an unusual bug that if nginx is not running before certbot --nginx is used then Certbot will start a copy of nginx that is not compatible with systemctl. That can lead to odd problems.
The fix is just to be sure nginx is running.
Your #1 command has a post-hook so leaves nginx running in a good state before trying command #2. Maybe this explains why that "fixes" it?