Closed czerasz closed 9 years ago
I was also able to pass the provided tests. Below is are instructions how I approached it.
Login to the container:
docker exec -it nginx-cache-example bash
Create required symlink:
ln -s /usr/bin/cpan /usr/bin/cpanm
Install required libraries - test-nginx
:
git clone https://github.com/openresty/test-nginx.git /tmp/nginx-installation/test-nginx
cd /tmp/nginx-installation/test-nginx
perl Makefile.PL
make
make install
Install required libraries - test-base-pm
:
git clone https://github.com/ingydotnet/test-base-pm.git /tmp/nginx-installation/test-base-pm
cd /tmp/nginx-installation/test-base-pm
cpan Zilla::Dist
make install
Install required libraries - Spiffy
(this takes some time):
cpan Spiffy
I then run the tests which pass without any iussues:
cd /tmp/nginx-installation/ngx_cache_purge-2.3
prove
The issue is with the $proxy_host
variable, which is empty at the time cache purge runs.
Do you have any real reason for using it instead of the $host
variable?
Hi Piotrek. Thanks for the quick feedback! I will use the $host
variable.
I have integrated the module with Nginx 1.6.2 in this project.
I build the project with this helper command:
I start the container with Nginx inside with this helper command:
Then I add the file into the cache with:
After requesting it next time I see it's inside the cache (
X-Cache-Status: HIT
):When I try to purge it I get a
404
:Also the second way to purge doesn't work:
Here is the
nginx.conf
which I use.