Automatique https and connexion refused

February 9, 2019 333 views
Node.js DNS Ubuntu 18.04

Hello,

I got an ubuntu droplet today, installed my nodejs app, installed nginx so it run on direct ip instead of ip:3000, i bought a domain and changed the server_name to:

ns1.digitalocean.com
ns2.digitalocean.com
ns3.digitalocean.com

In the registar manager (1and1) i even see an image preview with my correct app.

I added the domain into networking for my droplet too.

But for some reason, going to the domain name give me a connexion refused and i see a https in the url, but i didnt installed any ssl certificate. Any idea what i could be missing ?

Thank you.

2 Answers

To give more infos, direct ip is here: http://178.128.101.145/
Wordking well but if i try access with the domain sica-web.app it redirect automatically to https://sica-web.app and dont work.

Here my nginx default:

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

    root /home/chris/webapp;

    server_name sica-web.app www.sica-web.app;

    location / {
        proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-NginX-Proxy true;
            proxy_pass http://localhost:3000;
            proxy_set_header Host $http_host;
            proxy_cache_bypass $http_upgrade;
            proxy_redirect off;
    }
}

And in digital ocean networking:

digitalocean

Anyway, fixed it by adding a ssl certificate but still curious about why i was automatically in https without having installing it.

Have another answer? Share your knowledge.