Skip to content
Foxipa
Code Completion 5 Challenges

Complete the config: Nginx Foundations

Fill in the missing pieces of worker architecture, signals, and installation commands.

Beginner ~4 min read

Challenge 1

Set the worker count to match the CPU cores.

nginx Your answer
# one worker per core
worker_processes ;

Press Ctrl⌘Enter to check your answer

Challenge 2

Reload the configuration without downtime.

nginx Your answer
$ nginx 

Press Ctrl⌘Enter to check your answer

Challenge 3

Validate the configuration as a dry run.

nginx Your answer
$ nginx  -c /etc/nginx/nginx.conf

Press Ctrl⌘Enter to check your answer

Challenge 4

Make workers run unprivileged while the master keeps root.

nginx Your answer
# master stays root; workers drop down
 nginx;

Press Ctrl⌘Enter to check your answer

Challenge 5

Give each worker's event loop room for 4096 sockets.

nginx Your answer
events {
     4096;
}

Press Ctrl⌘Enter to check your answer