nginx conf:
location / {
rewrite ^/cache.html$ /cache.jsp last;
}
location ~ \.jsp {
proxy_pass http://127.0.0.1:85;
#if I add proxy_cache here,will be cache every JSP file,I don't want it
}
#location ~ \.html {
#I want cache all ".html" page,but it's not work.
#proxy_cache cache;
#....
#}
I using a rewrite rule to mapping /cache.html to /cache.jsp
I want to access http//localhost/cache.html to cache page,
but access http//localhost/cache.jsp with out cache,
how to do? thanks for help :)