0
0
Nginxdevops~10 mins

Why Nginx exists - Test Your Understanding

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to start the Nginx service on a Linux system.

Nginx
sudo systemctl [1] nginx
Drag options to blanks, or click blank then click option'
Astop
Bstart
Crestart
Dstatus
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'stop' instead of 'start' will turn off the service.
2fill in blank
medium

Complete the Nginx configuration line to listen on port 80.

Nginx
listen [1];
Drag options to blanks, or click blank then click option'
A80
B443
C22
D8080
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing port 443 is for HTTPS, not HTTP.
3fill in blank
hard

Fix the error in the Nginx server block to serve files from the correct root directory.

Nginx
server {
    root [1];
}
Drag options to blanks, or click blank then click option'
A/usr/bin
B/etc/nginx
C/var/www/html
D/home/user
Attempts:
3 left
💡 Hint
Common Mistakes
Using /etc/nginx is for config files, not web content.
4fill in blank
hard

Complete the code to create a simple Nginx location block that serves static files.

Nginx
location / {
    root {BLANK_2}};
Drag options to blanks, or click blank then click option'
A{
B/var/www/static
C}
D/etc/nginx/html
Attempts:
3 left
💡 Hint
Common Mistakes
Using '}' to open the block is incorrect syntax.
5fill in blank
hard

Fill all three blanks to define a server block that listens on port 80, serves from /var/www/html, and uses index.html as the default file.

Nginx
server {
    listen [1];
    root [2];
    index [3];
}
Drag options to blanks, or click blank then click option'
A443
B/var/www/html
Cindex.html
D80
Attempts:
3 left
💡 Hint
Common Mistakes
Using port 443 is for HTTPS, not HTTP.