How fix: 301 Moved Permanently (cloudflare + letsencrypt)?

What has likely happened is that you commented out all the port 80 listeners, and now nginx is no longer listening on port 80, because it has no need.

May I suggest making your primary https listener also listen on port 80, as documented here: http://nginx.org/en/docs/http/configuring_https_servers.html#single_http_https_server

In your case, I believe this can be achieved by adding a second listen directive below your current one and changing the existing one to include ssl:

listen *:443 ssl;
listen *:80;
server_name worldmin.ru;

and then remove

ssl on;
2 Likes