I got 'https' but it does not work

My domain is: easycoding.live

My web server is (include version): Ubutuntu 21.04 x64

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

My hosting provider is: vultr.com

I can login to a root shell on my machine (yes or no, or I don't know): yes

I had to change ip address but still same domain name. old ip address has https certificate as well. same domain name has two different ip address and https? I detroyed old ip address before I got new one of course. I am just beginner and so many things I don't know.

2 Likes

Two things:

  • There isn't anything listening on port 443 which is the port used for HTTPS. So HTTPS is not working right now.
  • You don't have a HTTP to HTTPS redirect. (Which for now is good of course, as HTTPS isn't working. But when that works, you should implement a HTTP to HTTPS redirect.)
4 Likes

Hello, Osiris

Thank you for your short and clear answer

I tried to find out how to set up these things and finally returned here to ask you

I put some code like the following when I set up Nginx so do I need to put port number 443 next to 80?

/etc/nginx/sites-available/djangobook

server {
    listen 80 **443**;
    server_name easycoding.live ;

    location = /favicon.ico { access_log off; log_not_found off; }
    location /static/ {
        root /home/admin/github/djangobook;
    }

    location / {
        include proxy_params;
        proxy_pass http://unix:/run/gunicorn.sock;
    }
}

Is this right place? I don't know where to put and what to do

Thank you in advance
Sung Kam

4 Likes

Please read the nginx documentation about configuring HTTPS: Configuring HTTPS servers

This is just a hint for some reading. Depending on how you got the certificate in the first place this might or might not be exactly what you require. However, as you've not given us much information to work with, I can only provide generic documentation for you to read.

5 Likes

Thank you so much! I will try nginx documentation.

4 Likes

Good morning! Finally I fixed this problem thanks to you.

Have a good day

Once again, I do appreciate you

3 Likes

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