server {
  server_name www.example1.com;
  location / {
    set $memcached_key $uri;
    memcached_pass     127.0.0.1:11211;
    default_type       text/html;
    error_page         404 @fallback;
  }
 
  location @fallback {
    proxy_pass http://backend;
  }
}