Nginx sits between visitors and your application. It can return a static file itself or pass a request to a backend, the application that generates the response.
Follow a request for a product
Browser -> Nginx -> Application -> Database
Browser <- Nginx <- Application <- Database
For a product page, Nginx receives the request, selects the website and path rules, and forwards it to the application. The application reads the product and returns a response through Nginx. For a static image, Nginx can read the file directly instead.
