Process Flow - HTTP to HTTPS redirect
Client sends HTTP request
Nginx listens on port 80
Check if request is HTTP
Yes
Send 301 redirect to HTTPS URL
Client receives redirect and sends HTTPS request
Secure connection established
The server listens for HTTP requests and responds with a redirect to the HTTPS version, prompting the client to reconnect securely.