0
0
Nginxdevops~10 mins

Main configuration file (nginx.conf) - Interactive Code Practice

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

Complete the code to set the user that runs the nginx worker processes.

Nginx
user [1];
Drag options to blanks, or click blank then click option'
Anginx
Bwww-data
Cadmin
Droot
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'root' which is insecure.
Using a non-existent user.
2fill in blank
medium

Complete the code to specify the number of worker processes.

Nginx
worker_processes [1];
Drag options to blanks, or click blank then click option'
A4
B1
Cauto
Dmax
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'max' which is not a valid value.
Setting too many worker processes causing resource waste.
3fill in blank
hard

Fix the error in the directive to specify the error log file path.

Nginx
error_log [1] warn;
Drag options to blanks, or click blank then click option'
A/var/log/nginx/access.log
B/var/log/nginx/error.log
C/etc/nginx/error.log
D/var/log/nginx/error
Attempts:
3 left
💡 Hint
Common Mistakes
Using the access log path instead of error log.
Omitting the file extension.
4fill in blank
hard

Fill both blanks to set the events block with worker connections.

Nginx
events {
    worker_connections [1];
    [2] on;
}
Drag options to blanks, or click blank then click option'
A1024
Baccept_mutex
Coff
Dworker_rlimit_nofile
Attempts:
3 left
💡 Hint
Common Mistakes
Turning off accept_mutex which can reduce performance.
Using unrelated directives inside events block.
5fill in blank
hard

Fill all three blanks to define an HTTP server listening on port 80 with a root directory and index file.

Nginx
http {
    server {
        listen [1];
        root [2];
        index [3];
    }
}
Drag options to blanks, or click blank then click option'
A80
B/usr/share/nginx/html
Cindex.html
D443
Attempts:
3 left
💡 Hint
Common Mistakes
Using port 443 without SSL configuration.
Setting root to a non-existent directory.
Omitting the index file.