# Problem with ajp proxy module

**URL:** <https://www.ruby-forum.com/t/problem-with-ajp-proxy-module/223272>\
**Category:** NGINX\
**Created:** [September 27, 2012, 12:02pm UTC](https://www.ruby-forum.com/t/problem-with-ajp-proxy-module/223272 "2012-09-27T12:02:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [September 27, 2012, 12:02pm UTC](https://www.ruby-forum.com/t/problem-with-ajp-proxy-module/223272/1 "2012-09-27T12:02:23Z")

</div>

Hi,  
No problem to make ajp module works but I have a problem with the  
ajp\_cache directive.It stores only one file in the cache and always  
return this file.For example, if I call [http://mon](http://mon) url/image.jpg, it  
will returns this file even when I will call [http://mon](http://mon) url/style.css.  
Here is my config file :  
#user nobody;worker\_processes 1;  
#error\_log logs/error.log;#error\_log logs/error.log notice;#error\_log  
logs/error.log info;  
#pid logs/nginx.pid;

events { worker\_connections 1024;}

http { include mime.types; default\_type  
application/octet-stream;  
#log\_format main '$remote\_addr - $remote\_user [$time\_local]  
“$request” ’ # '$status $body\_bytes\_sent  
“$http\_referer” ’ # ‘“$http\_user\_agent”  
“$http\_x\_forwarded\_for”’;  
#access\_log logs/access.log main;  
sendfile on; #tcp\_nopush on;  
#keepalive\_timeout 0; keepalive\_timeout 65;  
#gzip on; upstream tomcat-preprod { server  
[pacaya.altima.fr:8012](http://pacaya.altima.fr:8012); keepalive 10; } ajp\_cache\_path  
/var/www/cache levels=1:2 keys\_zone=myzone:50m; server {  
listen 80; server\_name erp-preprod;  
location ~ .(js|css|png|gif|jpg|ico)$ { ajp\_pass tomcat-preprod;  
ajp\_cache\_valid 60m; ajp\_cache myzone; }  
location /sx-preprod { ajp\_keep\_conn on; ajp\_pass  
tomcat-preprod; } location /sx { rewrite /sx /sx-preprod; }  
location / { rewrite / /sx-preprod; } error\_page 500  
502 503 504 /50x.html; location = /50x.html { root  
html; }  
}  
}  
Any advice ?
