0
0
Nginxdevops~20 mins

Web server vs application server in Nginx - Practice Questions

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Web Server vs Application Server Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Role of Nginx as a Web Server

Which statement best describes the primary role of Nginx when used as a web server?

AIt serves static content and forwards requests to application servers.
BIt processes business logic and runs application code directly.
CIt stores data and manages database transactions.
DIt compiles source code into executable programs.
Attempts:
2 left
💡 Hint

Think about what a web server does when a user visits a website.

💻 Command Output
intermediate
2:00remaining
Nginx Configuration for Proxying Requests

Given the following Nginx configuration snippet, what will be the result when a client requests /app?

Nginx
location /app {
    proxy_pass http://127.0.0.1:8080;
}
ANginx forwards the request to an application server running on localhost port 8080.
BNginx returns a 404 Not Found error for /app requests.
CNginx serves the request directly from its own files under /app.
DNginx blocks the request due to missing permissions.
Attempts:
2 left
💡 Hint

Look at the proxy_pass directive and its target address.

Troubleshoot
advanced
2:00remaining
Diagnosing 502 Bad Gateway Error

When Nginx is configured to proxy requests to an application server, clients sometimes get a 502 Bad Gateway error. What is the most likely cause?

ANginx configuration file has a syntax error causing it to fail starting.
BNginx is serving static files but the files are missing.
CThe client sent a malformed HTTP request that Nginx rejected.
DThe application server is not running or not reachable at the proxy address.
Attempts:
2 left
💡 Hint

Think about what happens if Nginx cannot connect to the backend server.

🔀 Workflow
advanced
3:00remaining
Setting Up Nginx as Reverse Proxy for Application Server

Which sequence correctly describes the steps to configure Nginx as a reverse proxy for an application server running on port 5000?

A1,2,4,3
B4,1,2,3
C1,4,2,3
D2,1,4,3
Attempts:
2 left
💡 Hint

Think about installing software before configuring it and starting services.

Best Practice
expert
3:00remaining
Optimizing Nginx and Application Server Setup

Which practice improves performance and reliability when using Nginx as a web server in front of an application server?

AServe all dynamic content directly from Nginx without forwarding to the application server.
BUse Nginx to serve static files and cache responses from the application server.
CDisable keep-alive connections between Nginx and the application server to reduce resource use.
DRun the application server on the same port as Nginx to simplify configuration.
Attempts:
2 left
💡 Hint

Consider how caching can reduce load and speed up responses.