2012-08-06 13:17:44 +01:00
|
|
|
http {
|
|
|
|
...
|
|
|
|
server {
|
|
|
|
...
|
|
|
|
|
|
|
|
location / {
|
|
|
|
try_files $uri $uri/ @memcached;
|
|
|
|
}
|
2012-02-21 06:50:25 +00:00
|
|
|
|
2012-08-06 13:17:44 +01:00
|
|
|
location @memcached {
|
|
|
|
default_type text/html;
|
2012-02-21 06:50:25 +00:00
|
|
|
|
2012-08-16 11:33:56 +01:00
|
|
|
set $memcached_key DATAPREFIX$scheme://$host$request_uri;
|
2012-08-06 13:17:44 +01:00
|
|
|
memcached_pass MEMCACHEDHOST:MEMCACHEDPORT;
|
|
|
|
error_page 404 = @rewrites;
|
|
|
|
}
|
|
|
|
|
|
|
|
location @rewrites {
|
|
|
|
rewrite ^(.*)$ /index.php?q=$1 last;
|
|
|
|
}
|
2012-08-16 11:33:56 +01:00
|
|
|
|
2012-08-06 13:17:44 +01:00
|
|
|
...
|
|
|
|
}
|
2012-02-21 06:50:25 +00:00
|
|
|
}
|
2012-08-06 13:17:44 +01:00
|
|
|
...
|