Complete the code to enable HTTPS by specifying the SSL certificate file.
ssl_certificate [1];The ssl_certificate directive points to the SSL certificate file needed for HTTPS.
Complete the code to specify the SSL key file for HTTPS in nginx configuration.
ssl_certificate_key [1];The ssl_certificate_key directive specifies the private key file for HTTPS encryption.
Fix the error in the nginx server block to listen on HTTPS port.
listen [1] ssl;HTTPS uses port 443, so the server must listen on port 443 with SSL enabled.
Fill both blanks to complete the nginx server block for HTTPS with strong security.
ssl_protocols [1]; ssl_ciphers [2];
Use modern TLS versions and strong ciphers to secure HTTPS connections.
Fill all three blanks to configure nginx to redirect HTTP to HTTPS and enable SSL.
server {
listen [1];
return [2] https://$host$request_uri;
}
server {
listen [3] ssl;
ssl_certificate /etc/nginx/ssl/server.crt;
ssl_certificate_key /etc/nginx/ssl/server.key;
}Port 80 listens for HTTP and redirects permanently (301) to HTTPS on port 443 with SSL enabled.