0
0
Nginxdevops~10 mins

Nginx Plus monitoring - Interactive Code Practice

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

Complete the code to enable the Nginx Plus status page.

Nginx
location /status {
    stub_status [1];
}
Drag options to blanks, or click blank then click option'
Atrue
Boff
Con
Denabled
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'off' instead of 'on' disables the status page.
Using 'enabled' or 'true' is not valid syntax.
2fill in blank
medium

Complete the code to allow access to the Nginx Plus status page only from localhost.

Nginx
location /status {
    allow [1];
    deny all;
}
Drag options to blanks, or click blank then click option'
A0.0.0.0
B127.0.0.1
C192.168.1.1
Dlocalhost
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'localhost' is not valid in the allow directive.
Allowing '0.0.0.0' grants access to all IPs.
3fill in blank
hard

Fix the error in the configuration to enable the Nginx Plus API endpoint.

Nginx
location /api {
    api [1];
}
Drag options to blanks, or click blank then click option'
Aon
Bactivate
Ctrue
Denable
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'enable' or 'activate' causes syntax errors.
Using 'true' is not recognized by Nginx.
4fill in blank
hard

Fill both blanks to configure the Nginx Plus API to listen on port 8080 and allow only local access.

Nginx
server {
    listen [1];
    location /api {
        allow [2];
        deny all;
        api on;
    }
}
Drag options to blanks, or click blank then click option'
A8080
B127.0.0.1
C0.0.0.0
D80
Attempts:
3 left
💡 Hint
Common Mistakes
Using port 80 instead of 8080 for the API.
Allowing '0.0.0.0' grants access to everyone.
5fill in blank
hard

Fill all three blanks to create a status page with JSON format, enabled stub_status, and allow access from localhost.

Nginx
location /status {
    stub_status [1];
    status_format [2];
    allow [3];
    deny all;
}
Drag options to blanks, or click blank then click option'
Aon
Bjson
C127.0.0.1
Doff
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to enable stub_status.
Using 'off' instead of 'on' disables status.
Allowing access from all IPs instead of localhost.