Complete the code to set the user that runs the nginx worker processes.
user [1];The user directive sets the system user that runs nginx worker processes. Commonly, this is nginx.
Complete the code to specify the number of worker processes.
worker_processes [1];The worker_processes directive sets how many worker processes nginx will spawn. Using auto lets nginx decide based on CPU cores.
Fix the error in the directive to specify the error log file path.
error_log [1] warn;The error_log directive requires a valid file path. The standard path is /var/log/nginx/error.log.
Fill both blanks to set the events block with worker connections.
events {
worker_connections [1];
[2] on;
}The worker_connections directive sets max connections per worker. accept_mutex on; enables accept mutex for better connection handling.
Fill all three blanks to define an HTTP server listening on port 80 with a root directory and index file.
http {
server {
listen [1];
root [2];
index [3];
}
}The listen directive sets the port (80 for HTTP). root sets the directory for files. index sets the default file served.