Django nginx new certificate 404 error

Hello i’m trying to install a new certificate on my VPS , I can access and but when i try to create the certificate it gives me this error, please help

this is my nginx configuration

location /.well-known/acme-challenge/ {
root /var/www/django_projects/Outdooors/static/;

My domain is:

I ran this command: certbot certonly --webroot -w /var/www/django_projects/Outdooors/ -d -d

It produced this output: Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for
Using the webroot path /var/www/django_projects/Outdooors for all unmatched domains.
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: I nvalid response from [2a07:7800::137]: “\n\n404 Not Found\n\n

Not Found



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

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

My hosting provider, if applicable, is:OVH

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):no

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot):certbot 0.31.0

Those are two different directories -- one ends with "/Outdooors/" and one ends with "/Outdooors/static/". Certbot and Nginx need to be using whichever one is correct.

I'm confused by the error. currently has a different IPv6 address:  3599  A  3599  AAAA  2001:41d0:305:2100::8514

Connecting to using IPv6 also currently times out.

By the way, you should add "--deploy-hook 'systemctl reload nginx'" to your Certbot command so that Certbot will automatically reload Nginx after the certificate is renewed.

You could also use Certbot's nginx plugin instead of the webroot plugin. Then you wouldn't have to deal with specific paths, and Nginx would automatically be reloaded.

Hello @mnordhoff

I configured IPV6 on my AAAA record and configured the IPV6 Address on my VPS too
and now it works

using nginx plugins didnt work for me only webroot did

Thank you very much for the help

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