Recall & Review
beginner
What is a reverse proxy in the context of web servers?
A reverse proxy is a server that sits between clients and backend servers. It receives client requests and forwards them to the backend server, then sends the server's response back to the client. It helps with load balancing, security, and hiding backend details.
Click to reveal answer
beginner
Why use Nginx as a reverse proxy for an Express app?
Nginx can handle many client connections efficiently, serve static files quickly, provide SSL termination, and forward requests to the Express app. This improves performance, security, and scalability.
Click to reveal answer
intermediate
Which Nginx directive is used to forward requests to the Express backend?
The
proxy_pass directive is used inside a location block to forward client requests to the Express backend server.Click to reveal answer
intermediate
How does Nginx improve security when used as a reverse proxy?
Nginx can hide backend server details, filter requests, limit request rates, and handle SSL/TLS encryption. This protects the Express app from direct exposure to the internet.
Click to reveal answer
beginner
What is the role of the
location block in Nginx reverse proxy configuration?The
location block defines which URL paths Nginx should match and how to handle those requests, such as forwarding them to the Express backend using proxy_pass.Click to reveal answer
What does the
proxy_pass directive do in Nginx?✗ Incorrect
proxy_pass tells Nginx where to send the incoming client requests, usually to a backend server like Express.
Which benefit does Nginx provide when acting as a reverse proxy for Express?
✗ Incorrect
Nginx can handle SSL and distribute requests to multiple backend servers, improving security and scalability.
Where in the Nginx config do you specify the backend server URL?
✗ Incorrect
The proxy_pass directive inside a location block sets the backend server URL.
What port does Express usually listen on when behind Nginx reverse proxy?
✗ Incorrect
Express often listens on ports like 3000, while Nginx listens on standard HTTP/HTTPS ports.
Which of these is NOT a reason to use Nginx as a reverse proxy?
✗ Incorrect
Nginx does not run Express code; it forwards requests to the Express server.
Explain how Nginx acts as a reverse proxy for an Express app and why it is useful.
Think about what Nginx does before the request reaches Express.
You got /5 concepts.
Describe the key parts of an Nginx configuration to set up a reverse proxy for Express.
Focus on the directives inside server and location blocks.
You got /4 concepts.