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