0
0
Nginxdevops~10 mins

Configuration testing (nginx -t) - Interactive Code Practice

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

Complete the command to test the nginx configuration for syntax errors.

Nginx
sudo nginx [1]
Drag options to blanks, or click blank then click option'
A-t
B-s
C-v
D-c
Attempts:
3 left
💡 Hint
Common Mistakes
Using -s which is for sending signals to nginx.
Using -v which shows version info.
Using -c which specifies a config file.
2fill in blank
medium

Complete the command to test nginx configuration using a specific config file located at /etc/nginx/custom.conf.

Nginx
sudo nginx -t [1] /etc/nginx/custom.conf
Drag options to blanks, or click blank then click option'
A-s
B-c
C-v
D-p
Attempts:
3 left
💡 Hint
Common Mistakes
Using -v which shows version info.
Using -s which sends signals.
Using -p which sets the prefix path.
3fill in blank
hard

Fix the error in the command to test nginx configuration syntax.

Nginx
sudo nginx [1] -t
Drag options to blanks, or click blank then click option'
A-v
B-c
C-s
D-t
Attempts:
3 left
💡 Hint
Common Mistakes
Placing -t after other options.
Using -c or -s incorrectly.
4fill in blank
hard

Fill both blanks to complete the command that tests nginx configuration and specifies a custom prefix directory.

Nginx
sudo nginx [1] [2] /etc/nginx
Drag options to blanks, or click blank then click option'
A-t
B-c
C-p
D-s
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up -c and -p options.
Using -s which sends signals.
5fill in blank
hard

Fill all three blanks to create a command that tests nginx configuration, specifies a config file, and sends a reload signal if the test passes.

Nginx
sudo nginx [1] [2] /etc/nginx/nginx.conf [3] reload
Drag options to blanks, or click blank then click option'
A-t
B-c
C-s
D-v
Attempts:
3 left
💡 Hint
Common Mistakes
Using -v instead of -t for testing.
Omitting the reload signal.
Mixing up option order.