This repository shows an example usage of the Nginx slowfs module.
Start container
docker-compose up
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 withdocker-compose ps
Cached file content:
$ docker exec nginxslowfs_nginx_1 cat /data/cache/1/27/2bba799df783554d8402137ca199a271
cf...=>
KEY: /test-file.txt
test