How it works...

For all requests, the location block directive is set to proxy all connections to a specified address (127.0.0.1:8000 in this instance). With the basic settings, NGINX doesn't manipulate any of the data, nor does it cache or load balance. Testing with a basic proxy method is always a good step before moving to a complicated configuration to ensure that your application or program will work as expected.

To get around the fact that you don't want private information cached (and therefore potential information leakage), NGINX will check for both cookies and cache headers. For example, when you log in to a WordPress system, this login will return a Set-Cookie header and NGINX will therefore exclude this from being cached.