'm trying to find way how to serve cached files with nginx.
I have stored search results to json file in shared memory. Next time when user tries to look up the same search, it supposed to be served by nginx by try_files directive.
Here is the request string:
/api/ajax-ticker-search?search=SBER Here is what I have in nginx:
location /api/ajax-ticker-search/ { try_files /dev/shm/searchResults/$arg_search.json @apisearch; } I do have file named SBER.json in /dev/shm/searchResults but nginx is not serving it, always falling back to @apisarch location.
What's wrong with try_files and how can make it work and serve stored json file?