0
0
Nginxdevops~20 mins

Nginx installation - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Nginx Installation Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
Nginx service status after installation
After installing Nginx on a Linux system using the package manager, what is the expected output of systemctl status nginx if the service is running correctly?
Nginx
systemctl status nginx
AActive: active (running) since [date and time]; Main PID: [pid] (nginx)
BActive: inactive (dead) since [date and time]
CUnit nginx.service could not be found.
DFailed to start nginx.service: Unit not found.
Attempts:
2 left
💡 Hint
Check the service status after installation and starting the service.
Configuration
intermediate
1:30remaining
Default Nginx configuration file location
Where is the default main configuration file for Nginx typically located on a standard Linux installation?
A/etc/nginx/nginx.conf
B/usr/local/nginx/nginx.conf
C/var/www/nginx.conf
D/home/nginx/nginx.conf
Attempts:
2 left
💡 Hint
Think about the standard configuration directory for system-wide services.
🔀 Workflow
advanced
2:30remaining
Correct order to install and start Nginx on Ubuntu
What is the correct order of commands to install Nginx and start its service on an Ubuntu system?
A2,1,3,4
B1,2,3,4
C1,3,2,4
D3,2,1,4
Attempts:
2 left
💡 Hint
Update package lists before installing, then start and enable the service.
Troubleshoot
advanced
2:00remaining
Error when starting Nginx: Address already in use
You try to start Nginx but get the error: bind() to 0.0.0.0:80 failed (98: Address already in use). What is the most likely cause?
AFirewall is blocking port 80
BNginx configuration file is missing
CAnother service is already using port 80
DNginx is not installed properly
Attempts:
2 left
💡 Hint
Port 80 can only be used by one service at a time.
Best Practice
expert
1:30remaining
Ensuring Nginx starts automatically after reboot
Which command ensures that Nginx will start automatically every time the system boots?
Asudo systemctl status nginx
Bsudo systemctl start nginx
Csudo systemctl restart nginx
Dsudo systemctl enable nginx
Attempts:
2 left
💡 Hint
Think about enabling services to run on boot.