Welcome! Log In Create A New Profile

Advanced

(no subject)

Elena Zwetkow
May 09, 2010 10:50AM
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 http://portal.gmx.net/de/go/maxdome01

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

(no subject)

Elena Zwetkow May 09, 2010 10:50AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 73
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready