0
0
Nginxdevops~5 mins

First Nginx configuration - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the main configuration file for Nginx?
The main configuration file for Nginx is nginx.conf. It controls how Nginx behaves and serves content.
Click to reveal answer
beginner
What directive defines the port Nginx listens on?
The listen directive inside a server block sets the port Nginx listens on, for example, listen 80; for HTTP.
Click to reveal answer
beginner
What is a server block in Nginx configuration?
A server block defines a virtual server. It groups settings like domain names, ports, and root folders for serving websites.
Click to reveal answer
beginner
How do you specify the folder where Nginx serves files from?
Use the root directive inside a server or location block to set the folder path, e.g., root /var/www/html;.
Click to reveal answer
beginner
What command reloads Nginx after changing its configuration?
Run sudo nginx -s reload to reload Nginx and apply configuration changes without stopping the server.
Click to reveal answer
Which directive sets the port Nginx listens on?
Aroot
Bserver_name
Clisten
Dlocation
Where do you define the domain names Nginx should respond to?
Aserver_name
Blisten
Croot
Dindex
What is the purpose of the root directive?
ASet the folder to serve files from
BSet the port number
CDefine server domain
DReload Nginx
Which command reloads Nginx configuration without stopping the server?
Asudo nginx -s stop
Bsudo nginx -s reload
Csudo nginx -s start
Dsudo nginx -s restart
What block groups settings like domain, port, and root folder in Nginx?
Aevents
Blocation
Chttp
Dserver
Describe the basic structure of a first Nginx configuration to serve a website on port 80.
Think about how to tell Nginx what port, domain, and folder to use.
You got /5 concepts.
    Explain how to apply changes after editing the Nginx configuration file.
    What command lets Nginx use new settings without stopping?
    You got /3 concepts.