Hands-on task
Redirect HTTP to HTTPS
TLS is already configured: nginx serves HTTPS on 443 (self-signed certificate). Now make nginx on port 80 answer everyone with a 301 redirect to the https:// version of the same address — so nobody uses plain HTTP.
- nginx
- 301 redirect
- return
- server block
- https