Challenge - 5 Problems
Nginx Config Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
Output of nginx -t with separate site configs
You have two separate site config files in
/etc/nginx/sites-available/ enabled via symlinks in /etc/nginx/sites-enabled/. What is the output of nginx -t if both configs are syntactically correct?Attempts:
2 left
💡 Hint
If configs are correct and enabled properly, nginx -t reports syntax ok and test successful.
✗ Incorrect
When separate site config files are correctly placed and linked, nginx -t checks all configs and reports syntax ok and test successful if no errors.
❓ Configuration
intermediate2:00remaining
Correct way to enable a site config in nginx
Which command correctly enables a site config file named
mysite.conf located in /etc/nginx/sites-available/ by creating a symlink in /etc/nginx/sites-enabled/?Attempts:
2 left
💡 Hint
Enabling a site means linking the config, not copying or moving it.
✗ Incorrect
The standard practice is to create a symbolic link from sites-available to sites-enabled so nginx loads the config without duplicating files.
❓ Troubleshoot
advanced2:00remaining
Troubleshooting nginx site config not loading
You added a new site config file in
/etc/nginx/sites-available/ and created a symlink in /etc/nginx/sites-enabled/. After reloading nginx, the site does not respond. What is the most likely cause?Attempts:
2 left
💡 Hint
Check if the symlink is valid and accessible by nginx.
✗ Incorrect
If the symlink is broken or permissions prevent nginx from reading the config, the site won't load even if the config looks correct.
🔀 Workflow
advanced3:00remaining
Order of steps to add a new site with separate config
What is the correct order of steps to add a new website using separate config files in nginx?
Attempts:
2 left
💡 Hint
Always test config before reloading nginx.
✗ Incorrect
First create the config file, then enable it by linking, then test syntax, and finally reload nginx to apply.
✅ Best Practice
expert3:00remaining
Best practice for managing multiple site configs in nginx
Which practice is best for managing multiple site configurations in nginx to ensure easy maintenance and minimal downtime?
Attempts:
2 left
💡 Hint
Modular config files and testing before reload reduce errors and downtime.
✗ Incorrect
Separating configs per site and enabling them with symlinks allows easy management. Testing before reload prevents downtime.