NGINX Reverse Proxy Unable to Get SSL

I am trying to use NGINX and Ubuntu 20.04 to set up a reverse proxy that redirects requests to my site.

This is what I have in the /etc/nginx/sites-available/default

server {
listen 80 default_server;
listen [::]: 80 default_server;


location / {
  proxy_pass http://xx.xx.xx.xx (Public IPv4 address on AWS EC2);
  proxy_set_header Host $host;


My domain is:

I ran this command: sudo certbot --nginx

It produced this output:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx

Which names would you like to activate HTTPS for?


Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 1
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for
Waiting for verification...
Challenge failed for domain
http-01 challenge for
Cleaning up challenges
Some challenges have failed.


My web server is (include version): NGINX

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

My hosting provider, if applicable, is: GoDaddy

I can login to a root shell on my machine (yes or no, or I don't know): I don't know.

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 1.13.0

I'm not sure how the nginx plugin internally actually works, but you might need to make an exception to your proxy_pass directive for the /.well-known/acme-challenge/ path. I'm not familiair enough with nginx to say how that's done though.

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