I am deploying my django project on aws ec2 instance. When I tested my application with out ssl I am able to access it. But When I try to generate the ssl for my domain I am getting this error mentioned below.
here is my conf file:
server{
listen 80;
server_name interview.fitai.me;
location ^~ /.well-known/acme-challenge/ {
allow all;
root /var/www/html;
default_type "text/plain";
try_files $uri =404;
}
location /{
include proxy_params;
proxy_pass http://unix:/run/gunicorn.sock;
}
}
My domain is: interview.fitai.me
I ran this command : sudo certbot --nginx -vvv
It produced this output : Certbot failed to authenticate some domains (authenticator: nginx). The Certificate Authority reported these problems:
Domain: interview.fitai.me
Type: unauthorized
Detail: 2a02:4780:11:934:0:2e79:6fe1:2: Invalid response from http://interview.fitai.me/.well-known/acme-challenge/rb6FragdGmFIPOf7jkoj0MU1I1tUYCdwjzhkKUF8M0Q: 404
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.
The operating system my web server runs on is (include version): ubuntu 24.04
Cerbot Version = 2.9.0