Nginx + cloudflare block port 80 and site work only with port 443?

Hello, I want to block port 80 and the site to work only with port 443 or to have a redirect automatically, because when someone tries to attack with http://site.com:443/asd I get error 400 and I want to prevent this.

How to configure your server to only listen on 443 is something you need to clarify on an Nginx forum.

But to make Cloudflare automatically redirect HTTP requests, you’ll just need to follow https://developers.cloudflare.com/ssl/edge-certificates/additional-options/always-use-https

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