Complete the code to start a basic server block listening on port 80.
server {
listen [1];
}The listen directive specifies the port the server block listens on. Port 80 is the default for HTTP.
Complete the code to set the server name to example.com.
server {
server_name [1];
}The server_name directive defines which domain names this server block responds to. Here, it should be example.com.
Fix the error in the server block to correctly serve files from /var/www/html.
server {
root [1];
}The root directive sets the directory where the website files are located. The standard web root is /var/www/html.
Fill both blanks to configure the server block to listen on port 443 and enable SSL.
server {
listen [1] ssl;
ssl_certificate [2];
}Port 443 is the standard port for HTTPS. The ssl_certificate directive points to the SSL certificate file.
Fill all three blanks to create a server block that listens on port 80, sets server_name to mysite.com, and serves files from /srv/mysite.
server {
listen [1];
server_name [2];
root [3];
}This server block listens on port 80 (HTTP), responds to mysite.com, and serves files from /srv/mysite.