Nginx memcached setting
sastro
nginx-forum at nginx.us
Sun Nov 21 20:29:48 MSK 2010
My server running Nginx and php-fpm for wordpress. Today i installed
memcached but i dont know how to setting the memcached thing into conf
file. Here is my wordpres conf file
[code]
server{
listen 80;
server_name www.mywebsite.com;
access_log /var/log/nginx/mywpt.access_log;
error_log /var/log/nginx/mywpt.error_log;
root /home/mywebsite/public_html;
location / {
root /home/mywebsite/public_html/;
index index.html index.htm index.php;
# this serves static files that exist without running other
rewrite tests
if (-f $request_filename) {
expires 30d;
break;
}
# this sends all non-existing file or directory requests to
index.php
if (!-e $request_filename) {
rewrite ^(.+)$ /index.php?q=$1 last;
}
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME
/home/mywebsite/public_html/$fastcgi_script_name;
include fastcgi_params;
}
}
[/code]
where to put this code ?
server {
location / {
set $memcached_key $uri;
memcached_pass name:11211;
default_type text/html;
error_page 404 @fallback;
}
location @fallback {
proxy_pass backend;
}
}
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,152247,152247#msg-152247
More information about the nginx
mailing list