This repository shows an example usage of the Nginx slowfs module.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
config
documentation
nfs-dummy
Dockerfile
README.md
docker-compose.yml

README.md

Nginx SlowFS Module Example

This repository shows an example usage of the Nginx slowfs module.

Overview

nginx slowfs overview

Requirements

Setup

Start container

docker-compose up

Example

Test request:

$ curl -i 'localhost:8000/test-file.txt'
HTTP/1.1 200 OK
Server: nginx/1.6.2
Date: Mon, 23 Mar 2015 13:35:07 GMT
Content-Type: text/plain
Content-Length: 4
Last-Modified: Mon, 23 Mar 2015 12:48:15 GMT
Connection: keep-alive
Accept-Ranges: bytes

test

Cache file structure:

$ docker exec nginxslowfs_nginx_1 tree -A /data/cache/
/data/cache/
└── 1
    └── 27
        └── 2bba799df783554d8402137ca199a271

Note
You might change the container name (nginxslowfs_nginx_1). Search for the container name on your machine with docker-compose ps

Cached file content:

$ docker exec nginxslowfs_nginx_1 cat /data/cache/1/27/2bba799df783554d8402137ca199a271
cf...=>
KEY: /test-file.txt

test

Resources: