<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><font face="Calibri, sans-serif" size="3">Hi,</font><div style="font-family: Calibri, sans-serif; font-size: 12pt; "><br></div><div style="font-family: Calibri, sans-serif; font-size: 12pt; "><span style="font-size: 12pt; ">No problem to make ajp module works but I have a problem with the ajp_cache directive.</span></div><div style="font-family: Calibri, sans-serif; font-size: 12pt; "><span style="font-size: 12pt; ">It stores only one file in the cache and always return this file.</span></div><div style="font-family: Calibri, sans-serif; font-size: 12pt; "><span style="font-size: 12pt; ">For example, if I call http://mon url/image.jpg, it will returns this file even when I will call http://mon url/style.css.</span></div><div style="font-family: Calibri, sans-serif; font-size: 12pt; "><span style="font-size: 12pt; "><br></span></div><div style="font-family: Calibri, sans-serif; font-size: 12pt; "><span style="font-size: 12pt; ">Here is my config file :</span></div><div style="font-family: Calibri, sans-serif; font-size: 12pt; "><span style="font-size: 12pt; "><br></span></div><div><div><font face="Calibri, sans-serif">#user nobody;</font></div><div><font face="Calibri, sans-serif">worker_processes 1;</font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif">#error_log logs/error.log;</font></div><div><font face="Calibri, sans-serif">#error_log logs/error.log notice;</font></div><div><font face="Calibri, sans-serif">#error_log logs/error.log info;</font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif">#pid logs/nginx.pid;</font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif">events {</font></div><div><font face="Calibri, sans-serif"> worker_connections 1024;</font></div><div><font face="Calibri, sans-serif">}</font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif">http {</font></div><div><font face="Calibri, sans-serif"> include mime.types;</font></div><div><font face="Calibri, sans-serif"> default_type application/octet-stream;</font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif"> #log_format main '$remote_addr - $remote_user [$time_local] "$request" '</font></div><div><font face="Calibri, sans-serif"> # '$status $body_bytes_sent "$http_referer" '</font></div><div><font face="Calibri, sans-serif"> # '"$http_user_agent" "$http_x_forwarded_for"';</font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif"> #access_log logs/access.log main;</font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif"> sendfile on;</font></div><div><font face="Calibri, sans-serif"> #tcp_nopush on;</font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif"> #keepalive_timeout 0;</font></div><div><font face="Calibri, sans-serif"> keepalive_timeout 65;</font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif"> #gzip on;</font></div><div><font face="Calibri, sans-serif"> upstream tomcat-preprod {</font></div><div><font face="Calibri, sans-serif"> server pacaya.altima.fr:8012;</font></div><div><font face="Calibri, sans-serif"> keepalive 10;</font></div><div><font face="Calibri, sans-serif"> }</font></div><div><font face="Calibri, sans-serif"> <b> ajp_cache_path /var/www/cache levels=1:2 keys_zone=myzone:50m;</b></font></div><div><font face="Calibri, sans-serif"><b> </b></font></div><div><font face="Calibri, sans-serif"><b> server {</b></font></div><div><font face="Calibri, sans-serif"><b> listen 80;</b></font></div><div><font face="Calibri, sans-serif"><b> server_name erp-preprod;</b></font></div><div><b><br></b></div><div><font face="Calibri, sans-serif"><b><span class="Apple-tab-span" style="white-space:pre"> </span>location ~ \.(js|css|png|gif|jpg|ico)$ {</b></font></div><div><font face="Calibri, sans-serif"><b><span class="Apple-tab-span" style="white-space:pre"> </span>ajp_pass tomcat-preprod;</b></font></div><div><font face="Calibri, sans-serif"><b><span class="Apple-tab-span" style="white-space:pre"> </span>ajp_cache_valid 60m;</b></font></div><div><font face="Calibri, sans-serif"><b><span class="Apple-tab-span" style="white-space:pre"> </span>ajp_cache myzone;</b></font></div><div><font face="Calibri, sans-serif"><b><span class="Apple-tab-span" style="white-space:pre"> </span>}</b></font></div><div><font face="Calibri, sans-serif"><b><br></b></font></div><div><font face="Calibri, sans-serif"><b><span class="Apple-tab-span" style="white-space:pre"> </span>location /sx-preprod {</b></font></div><div><font face="Calibri, sans-serif"><b><span class="Apple-tab-span" style="white-space:pre"> </span>ajp_keep_conn on;</b></font></div><div><font face="Calibri, sans-serif"><b><span class="Apple-tab-span" style="white-space:pre"> </span>ajp_pass tomcat-preprod;</b></font></div><div><font face="Calibri, sans-serif"><b><span class="Apple-tab-span" style="white-space:pre"> </span>}</b></font></div><div><font face="Calibri, sans-serif"><b><span class="Apple-tab-span" style="white-space:pre"> </span>location /sx {</b></font></div><div><font face="Calibri, sans-serif"><b><span class="Apple-tab-span" style="white-space:pre"> </span>rewrite /sx /sx-preprod;</b></font></div><div><font face="Calibri, sans-serif"><b><span class="Apple-tab-span" style="white-space:pre"> </span>}</b></font></div><div><font face="Calibri, sans-serif"><b><br></b></font></div><div><font face="Calibri, sans-serif"><b><span class="Apple-tab-span" style="white-space:pre"> </span>location / {</b></font></div><div><font face="Calibri, sans-serif"><b><span class="Apple-tab-span" style="white-space:pre"> </span>rewrite / /sx-preprod;</b></font></div><div><font face="Calibri, sans-serif"><b><span class="Apple-tab-span" style="white-space:pre"> </span>}<span class="Apple-tab-span" style="white-space:pre"> </span></b></font></div><div><span class="Apple-tab-span" style="white-space:pre"><font face="Calibri, sans-serif"> </font></span></div><div><font face="Calibri, sans-serif"> error_page 500 502 503 504 /50x.html;</font></div><div><font face="Calibri, sans-serif"> location = /50x.html {</font></div><div><font face="Calibri, sans-serif"> root html;</font></div><div><font face="Calibri, sans-serif"> }</font></div><div><br></div><div><font face="Calibri, sans-serif"> }</font></div><div><font face="Calibri, sans-serif"><br></font></div><div><font face="Calibri, sans-serif">}</font></div><div style="font-family: Calibri, sans-serif; font-size: 12pt; "><br></div></div><div style="font-family: Calibri, sans-serif; font-size: 12pt; ">Any advice ?</div> </div></body>
</html>