Nginx: Web Server Fundamentals
Nginx: Web Server Fundamentals
Up to 20 questions, shuffled on every run
Welcome to the Nginx Basics Quiz! Nginx is the Swiss Army knife of modern web infrastructure. Whether you are serving a simple static site, managing traffic for a massive cluster of microservices, or securing your apps with SSL, Nginx is likely at the center of your architecture. This quiz will test your ability to read, write, and troubleshoot Nginx configurations. Let’s get started!
Answer key and explanations20 questions
The quiz above draws 20 questions at random from these 30, so a second attempt will not be the same run. Everything in the pool is listed here.
What is the primary role of a "Reverse Proxy"?
AnswerTo accept requests for a backend server and return the results
Which configuration block is used to define a virtual host in Nginx?
AnswerThe server {} block
What does the "proxy_pass" directive do?
AnswerIt maps a URL path to a backend server or upstream group
Which load balancing algorithm is the default in Nginx?
AnswerRound Robin
What is the purpose of the "upstream" block?
AnswerTo define a pool of backend servers for load balancing
What does "SSL Termination" mean in the context of Nginx?
AnswerDecrypting HTTPS traffic and sending HTTP to the backend
Which Nginx directive specifies the port the server should listen on?
AnswerThe "listen" directive
In Nginx, what does the "root" directive define?
AnswerThe directory on disk where static web files are located
What is the difference between "root" and "alias" in Nginx?
Answer"root" appends the URI to the path; "alias" replaces it
Which Nginx command is used to test the configuration for errors?
Answer`nginx -t`
What is the purpose of the "worker_processes" directive?
AnswerTo define the number of Nginx processes currently running
Which directive is used to redirect HTTP traffic to HTTPS?
Answerreturn 301 https://$host$request_uri;
What does the "worker_connections" directive define?
AnswerThe maximum simultaneous connections per worker process
Where is the main Nginx configuration file usually located on Linux?
Answer/etc/nginx/nginx.conf
What is the purpose of "gzip" in Nginx?
AnswerTo compress files before transmission to save bandwidth
What does the "location /" block match?
AnswerAny request not matched by a more specific block
Which directive is used to set a custom 404 error page?
Answererror_page 404 /custom_404.html;
What is the "try_files" directive commonly used for?
AnswerTo check for file existence and fall back to a default
What is "Nginx FastCGI" used for?
AnswerTo interface Nginx with a dynamic language processor
In load balancing, what does "weight" do?
AnswerIt assigns more traffic to servers with a higher value
What is the purpose of "proxy_set_header Host $host;"?
AnswerTo pass the original requested domain to the backend
What does the "include" directive do in Nginx?
AnswerIt pulls in configuration settings from an external file
What is an Nginx "Module"?
AnswerA plugin that adds specific features to the server
What is the "client_max_body_size" directive used for?
AnswerTo set the maximum allowed size of a client request
What does "Stub Status" provide in Nginx?
AnswerA page displaying basic performance and connection metrics
What is the "keepalive_timeout" directive?
AnswerThe time a connection stays open after a request
What is the purpose of "X-Forwarded-For" header?
AnswerTo identify the original IP address of the client
In Nginx, what does the "events {}" block contain?
AnswerDirectives that manage the processing of connections
What is "HSTS" (HTTP Strict Transport Security)?
AnswerA header that forces the browser to only use HTTPS
Which command reloads the Nginx configuration without stopping the service?
Answer`nginx -s reload`








