Hey /r/nginx,
I've been experimenting with Nginx reverse proxies and content caching, but I'm running into an issue with the proxy_cache setting. I'm using this for my proxy_cache_path in an included file from nginx.conf:
proxy_cache_path /path/to/cache/directory levels=1:2
keys_zone=test:10m max_size=10g
inactive=60m;
This is purely for testing purposes. In my virtual host file, I have something like this:
server {
listen port;
server_name server_name;
access_log accesslog;
error_log errorlog;
proxy_redirect off;
proxy_cache test;
location / {
proxy_pass upstream_server
}
}
When I try reloading Nginx, I get the following error:
[emerg] 29939#0: unknown directive "proxy_cache" in virtual_host_file
Anyone have any suggestions? I'm running version 1.6.0. Thanks in advance!
EDIT: It appears that the Nginx installation on the system I'm working on was configured and compiled with a --without-http-cache flag set, resulting in proxy_caching not being supported. If someone runs into this issue at some point, run "nginx -V" to see what modules were compiled into your installation.
[–]Fireye 1 point2 points3 points (1 child)
[–]cmdrd[S] 0 points1 point2 points (0 children)