Score:0

Infinite Redirect after Certbot https configuration

tn flag

Hey so I wanted to add https

I started with a simple nginx config of

worker_processes    1;
events {
    worker_connections  1024;
}

http {
    server {
        listen 80;
        server_name www.danielokita.com;
        location / {
            proxy_pass http://172.104.177.135:3333/;
        }
    }
}

Ran certbot --nginx

Now have

worker_processes    1;
events {
            worker_connections  1024;
}

http {
server {
        server_name danielokita.com www.danielokita.com;
        location / {
                proxy_set_header        X-Real-IP $remote_addr;
                proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header        X-Forwarded-Proto $scheme;
                proxy_set_header        Host $http_host;
                proxy_intercept_errors  on;
                proxy_pass http://172.104.177.135:3333/;
        }

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/danielokita.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/danielokita.com/privkey.pem; # 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 = danielokita.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


        listen 80;
        server_name danielokita.com www.danielokita.com;
    return 404; # managed by Certbot


}}

I have tried the methods found online and can't find the issue. Pls help

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.