This topic describes how to use NGINX as a proxy for Apsara File Storage NAS.
Background information
NGINX is a light-weight high-performance Web server. It includes many features and can be used as a reverse proxy. One of the most common application modes for NGINX is to serve as a reverse proxy. A proxy server accepts connection requests from clients over the Internet. Then, the proxy server forwards these requests to a server that resides in an internal network and returns responses from the server to these clients. In such cases, when a proxy server acts on behalf of the server, it is called a reverse proxy.
An application server that resides in a private network is not accessible by clients outside the private network. In such cases, a reverse proxy is required to serve as an intermediary between an application server and clients. The reverse proxy resides in the same private network as the application server but is accessible by clients outside the internal network. The reverse proxy and the application server can share the same physical server but use different ports.
The following example uses one NGINX server as a reverse proxy, four NGINX servers as proxy servers, and Apsara File Storage NAS as backend storage. Apsara File Storage NAS stores cache files of proxy servers, and back-to-origin files or static data files uploaded by end-users. Apsara File Storage NAS allows shared access to the same file system from different proxy servers. This enables data to be synchronized between proxy servers and ensures data consistency. This also prevents servers from repeatedly retrieving files from the origin and guarantees efficient use of bandwidth. The following figure shows an example of network topology.

You can create an environment as shown in the preceding topology by following the instructions provided in this topic. This topic takes a CentOS ECS instance as an example.