Learn how to configure the NGINX S3 Gateway for use with Filebase.
What is NGINX?
NGINX is open-source web server software that can be used for HTTP caching, load balancing, reverse proxying, and media streaming. NGINX can be used to act as a caching gateway for content stored in a private bucket. By using NGINX, your content isn’t susceptible to public discovery on the Internet, and caching helps you save on your bandwidth charges. Additional benefits include security control, compression and content optimization, and access to internal applications.
To do this, the NGINX S3 Gateway can be used. This S3 gateway implementation includes the following features:
Support for a single S3 bucket.
Caches content for 1 hour.
Supports NGINX open source and NGINX plus.
Uses GET and HEAD requests only.
Is not configured with SSL/TLS.
Read below to learn how to configure the NGINX S3 Gateway for use with Filebase.
Prerequisites:
1. To use the NGINX S3 Gateway, a Docker container can be used. Start by cloning the following GitHub repository:
2. Next, navigate inside the newly created directory:
cd nginx-s3-gateway
3. Copy your certificate and key pair.
This key pair can be found in the F5 Customer Portal if you are a NGINX Plus user, or this key pair can be copied from a certificate generator. This certificate and key pair will need to be named nginx-repo.crt and nginx-repo.key respectively.
4. Store these two files in the ./plus/etc/ssl/nginx subdirectory.
5. Next, build the Docker container image.
Using Docker BuildKit is recommended since it supports passing a NGINX Plus license file into the container build. Use the following BuildKit command: