0
0
Nginxdevops~20 mins

Stub status module in Nginx - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Stub Status Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
1:30remaining
Nginx stub_status basic output
You have enabled the stub_status module in Nginx and accessed the status URL. What is the typical output format you will see?
A
Server status: OK
Connections: 5
Requests: 20
CPU usage: 10%
B
Status: Active
Connections: 5
Requests handled: 20
Errors: 0
C
Active connections: 5 
server accepts handled requests
 10 10 20 
Reading: 0 Writing: 1 Waiting: 4
D
Nginx running
Connections: 5
Requests: 20
Memory usage: 50MB
Attempts:
2 left
💡 Hint
Look for the exact format with 'Active connections' and the three numbers line.
Configuration
intermediate
2:00remaining
Enable stub_status in Nginx config
Which configuration snippet correctly enables the stub_status module on the /nginx_status URL in Nginx?
A
location /nginx_status {
    stub_status;
    allow 127.0.0.1;
    deny all;
}
B
location /nginx_status {
    status_stub on;
    allow 127.0.0.1;
    deny all;
}
C
location /nginx_status {
    stub_status on;
    allow 127.0.0.1;
    deny all;
}
D
location /nginx_status {
    enable_stub_status;
    allow 127.0.0.1;
    deny all;
}
Attempts:
2 left
💡 Hint
The directive to enable stub_status is exactly 'stub_status;' inside the location block.
Troubleshoot
advanced
2:00remaining
Stub_status returns 404 error
You configured stub_status on /status but when accessing http://localhost/status you get a 404 error. What is the most likely cause?
AThe stub_status module is not compiled into Nginx.
BThe Nginx service is not running.
CThe firewall is blocking port 80.
DThe stub_status directive is missing inside the location block for /status.
Attempts:
2 left
💡 Hint
Stub_status must be compiled into Nginx or it won't recognize the directive.
🔀 Workflow
advanced
2:00remaining
Secure stub_status access workflow
You want to allow stub_status access only from your local machine and deny all others. Which workflow correctly achieves this?
AConfigure location with stub_status; allow all; then reload Nginx.
BConfigure location with stub_status; allow 0.0.0.0/0; then reload Nginx.
CConfigure location with stub_status; deny all; then reload Nginx.
DConfigure location with stub_status; allow 127.0.0.1; deny all; then reload Nginx.
Attempts:
2 left
💡 Hint
Allow only localhost IP and deny all others is the secure approach.
Best Practice
expert
2:30remaining
Best practice for monitoring with stub_status
Which practice is best when using stub_status for production monitoring?
ADisable stub_status completely to avoid any information leaks.
BEnable stub_status only on localhost and use a secure proxy for remote access.
CExpose stub_status publicly without restrictions for easy access.
DUse stub_status with default settings and no IP restrictions.
Attempts:
2 left
💡 Hint
Consider security and controlled access for production environments.