Which of the following is the main reason to use a reverse proxy like Nginx in front of backend applications?
Think about how a reverse proxy acts as a middleman between clients and servers.
A reverse proxy hides backend servers from direct access, improving security and allowing centralized control of traffic.
Given this Nginx config snippet, what happens when a client requests http://example.com/api/data?
location /api/ {
proxy_pass http://localhost:5000/;
}Look at how proxy_pass rewrites the URL path.
The proxy_pass directive forwards requests matching /api/ to the backend at http://localhost:5000/, appending the rest of the path.
You configured Nginx as a reverse proxy to a backend app on port 8080. Clients get a 502 Bad Gateway error. What is the most likely cause?
502 Bad Gateway means Nginx cannot connect to the backend server.
If the backend app is down or not listening on the expected port, Nginx cannot forward requests, causing 502 errors.
What is the correct order of steps to enable HTTPS with SSL termination on Nginx reverse proxy?
Think about preparing certificates before configuring Nginx.
You first get certificates, then configure Nginx to use them, reload Nginx, and finally test the connection.
What is the main benefit of enabling caching in a reverse proxy like Nginx for backend applications?
Think about how caching stores responses to serve faster next time.
Caching stores responses from backend apps so repeated requests can be served quickly without hitting the backend again, reducing load and latency.