Getting 'this site can't be reached' error after installing letsencrypt on nginx/ubuntu 18.04

My domain is:

It produced this output: this site can't be reached

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

My hosting provider, if applicable, is: aws lightsail

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 0.27.0

I'm trying to install an SSL certificate on an Ubuntu server with Nginx.
The certificate installs successfully but I get site can't be reached. I'mThis is my current .conf file if this helps.

server {

  location / { 
        proxy_set_header Host $host;

    listen [::]:443 ssl;
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

server {
    if ($host = {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    if ($host = {
        return 301 https://$host$request_uri;
    } # managed by Certbot

  listen 80 default_server;
  listen [::]:80 default_server;
    return 404; # managed by Certbot

I'm fairly new to this, is there something obvious I'm missing?
I did run the command 'ufw status' and the port for https is open.

Welcome @aorr

It does not look like 443 is open to the public internet:

22/tcp  open     ssh
80/tcp  open     http
443/tcp filtered https

Check the LightSail firewall too


Thank you. It was the LightSail firewall that was preventing the connection.


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