Skip to content
Foxipa
Code Completion 5 Challenges

Complete the config: The Nginx Debugging Toolkit

Fill in working_directory for core dumps, debug logging, and forensics commands.

Advanced ~4 min read

Challenge 1

Give dropped-privilege workers a writable place for core dumps.

nginx Your answer
 /var/cache/nginx/cores/;

Press Ctrl⌘Enter to check your answer

Challenge 2

Dump the fully merged, active configuration.

nginx Your answer
$ nginx 

Press Ctrl⌘Enter to check your answer

Challenge 3

Trace events on one canary server block only.

nginx Your answer
server {
     /var/log/nginx/canary.error.log debug;
}

Press Ctrl⌘Enter to check your answer

Challenge 4

Count a worker's open file descriptors.

nginx Your answer
$ ls -l /proc/$(pgrep -f 'nginx: worker' | head -1)/ | wc -l

Press Ctrl⌘Enter to check your answer

Challenge 5

Identify process roles in the process list.

nginx Your answer
$ ps aux | grep 

Press Ctrl⌘Enter to check your answer