I'm using Nginx to serve a Drupal site and with Boost.
So far it's been working fine, but recently we added a mobile version and i configured boost/drupal to cache the mobile version in another directory, however i'm triying to configure Nginx to check for the adecuate directory if the device is mobile, but i'm getting 404 for some pages, and others never ever hit the cached files.
I've a location @cache with something like this:
set $mobile_rewrite desktop;
if ($http_user_agent ~ (iPhone|Android) ) {
set $mobile_rewrite mobile;
}
try_files /cache/normal/$mobile_rewrite/$host${uri}_$args.html /cache/$host${uri}_$args.html @drupal;
When hitting the frontpage with a mobile user agent, i get served the mobile version, but every time it recreates it (so it goes to the @drupal location), and if i try to navigate further in the site (with mobile user agent) i get a 404 error
Any ideas?
I solved it using custom error and different locations.