In the preceding section, we developed a Python application running on the
5000 port. Now, we want to configure NGINX to Proxy the server using the following directives. We will also try to cache the response from the Python server by enabling the proxy cache.
In addition to the directives, the NGINX Proxy module also creates the
$proxy_add_x_forward_for variables that can be used at various places such as Proxy headers.
This directive can be used to specify the protocol, address, and URL (optional) of the upstream server. The protocol takes the value
https. The address can be in any of the following forms: