(no subject)

Hello Nginx - Mailinglist Members,

i try to optimize my nginx configuration. Currently i use
memcache as frontend cache, but i would try to convert my
current memcache-cache to a disc cache on ssd. My goal is
setting and purging the cache from backend, is there a example
on the net?

Thanks for your Help, kind regardas Elena

This is my current configuration:

location / {
  default_type text/html;
  proxy_set_header Host $http_host;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_redirect off;
  proxy_intercept_errors on;

  if ($request_method = POST) {
      proxy_pass http://backend1;
      break;
  }

  if ($http_cookie ~* "NOCACHE=1" ) {
      proxy_pass http://backend1;
      break;
  }

  # fetch key from memcache: "yourproject:Action:$uri", like 

“yourproject:Action:/posts/1”
set $memcached_key “$host$uri”;
memcached_pass localhost:11211;

  error_page 404 502 = @fallback;
}

location @fallback {
  proxy_set_header Host $http_host;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  proxy_redirect off;
  proxy_pass http://backend1;
  internal;
}


GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter Aktuelle Nachrichten aus Politik, Wirtschaft & Panorama | GMX