Unable to connect to the server [nginx]

My domain is: www.votelearn.com

I ran this command: sudo /usr/local/bin/certbot-auto --nginx

It produced this output: https://www.ssllabs.com/ssltest/analyze.html?d=www.votelearn.com

My web server is (include version): Nginx

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

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

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot): certbot 0.38.0

The problem you are experiencing is a redirect loop.

This sometimes happens when you are using Cloudflare and setting up Certbot for the first time with an HTTP to HTTPS redirect.

The cause is basically that:

  • The visitor connects to your site via Cloudflare over HTTPS (port 443).
  • Cloudflare connects to your website over HTTP (port 80).
  • Your server, thinking the visitor is visiting over HTTP, sends a redirect back to HTTPS.
  • The visitor receives a redirect to HTTPS, but since they are already on HTTPS, it’s an infinite loop.

In general, the solution to this is to change your Cloudflare SSL setting from “Flexible” to “Full” or “Full (strict)”.

See this Cloudflare article for more info: https://support.cloudflare.com/hc/en-us/articles/200170416-End-to-end-HTTPS-with-Cloudflare-Part-3-SSL-options

1 Like

the ERR_TOO_MANY_REDIRECTS fixed thanks , but I still get ’ Unable to connect to the server’

and there is a problem i don’t understand when i open the home page the ‘https’ not working but when i open any othe page like this for example ‘https://www.votelearn.com/categories/programming/’ the ‘https’ working

I can open your home page and all of your other pages just fine. The problem looks fully fixed to me.

It might be that your browser is caching some of the redirects. Maybe try a different browser or use private browsing mode?

but why the browser showing this in home page only?

That’s a mixed content warning. It means you have insecure resources on your home page’s HTML.

It’s not a problem with your SSL certificate but with the actual contents of your website.

You can use a tool like Why No Padlock to find which resources are insecure, and then fix them.

For example, according to https://www.whynopadlock.com/results/33123506-f194-498f-9d08-ca96f4d977a3 , the insecure content on your home page is http://ring-lang.sourceforge.net/thering.jpg . You could fix that by downloading the image and serving it securely from your own website, rather than hotlinking it from the Sourceforge website.

1 Like

Thanks, You Helped me a lot

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