Https site available but not in http

Hello,
I’ve obtain a certificate with certbot for my site www.example.eu using a web server(nginx).
Now my site is only available if I type the address “https://www.example.eu” but not when I type “http://www.example.eu”.

I redirect http to https on nginx with : return 301 https://$server_name$request_uri

In my admin panel of domain i redirect www.example.eu in http://xx.xx.xx.xx:81/
I have a public static IP with port forwarding, so when I type xx.xx.xx.xx:81 I will be redirect to server block of nginx.

Why can I not access to my website with http (ERR_ADDRESS_UNREACHABLE)??

Thanks.

From what you’ve described, you’ve set up two forwards: one in the admin panel of your domain, from port 80 to port 81, and one in nginx, from http (80) to https (443). Why have you done this?

Now I changed my configuration.
I’ve setting on goDaddy the forwarding from www.example.eu to http://xx.xx.xx.xx(my static ip)
In my conf file nginx setting: listen 80; listen 443 ssl; and server_name : www.example.eu
In my router I have setting port forward from outside with port 80 to my server(same port).
It is correct?
Thank you.

Sorry not to reply sooner. I don’t know nginx well at all. The key question is, does your site work as you expect it now? I’m not sure that you want a forward from http://www.example.eu/ to http://xx.xx.xx.xx/. I think that you probably want to set an A record in DNS instead.

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