server {
  server_name www.example1.com;
  location / {
    if ($request_uri ~* "\.(ico|css|js|gif|jpe?g|png)\?[0-9]+$")        {
        expires max;
        break;
    }
    proxy_pass http://backend;
  }
}