u/rosseg

▲ 2 r/nginx

I'm trying to self-host a website. I got a domain from Porkbun (let's say its "my.domain"), and I am trying to figure out why I can't access my website from the internet. When I forward ports 443 and 80, I can access my website from my public ip address but not from the domain name.

Here's my nginx.conf:

 server {
                listen [::]:443 ssl ipv6only=on;
                listen 443 ssl;

                server_name my.domain;

                ssl_certificate /etc/letsencrypt/live/my.domain/fullchain.pem;
                ssl_certificate_key /etc/letsencrypt/live/my.domain/privkey.pem;

                location / {
                        proxy_pass http://localhost:8088;
                }
        }

        server {
                if ($host = my.domain) {        
                        return 301 https://$host$request_uri;
                }
                listen 80 default_server;
                listen [::]:80 default_server;

                server_name my.domain;
        }
reddit.com
u/rosseg — 7 days ago