memcached settings

xgdlm grangier at gmail.com
Thu Jul 2 03:38:50 MSD 2009


Hello,

http://wiki.nginx.org/NginxHttpMemcachedModule

server {
    listen 10.176.67.151:80;
    server_name www.mysite.com;

   location @fallback {
	proxy_pass http://10.176.67.151:8080/;
        include /etc/nginx/proxy.conf;
   }

    location / {
    set $memcached_key $uri;
    memcached_pass     127.0.0.1:11212;
   error_page 404 = @fallback;
   error_page 502 = @fallback;

    }
    location /static/ {
            alias /home/django/broadway.com/broadway/static/;
            expires 1d;
    }
    location /media/ {
            alias /home/django/broadway.com/src/django/django/contrib/ 
admin/media/;
            expires 1d;
    }
}

xav

Le 2 juil. 09 à 01:28, vburshteyn a écrit :

> Basically we are running a nginx/apache2/django setup
>
> memcached works, i tested it and such.  From here it goes to apache  
> server.  Everything works right up till i enable the
>
>    set $memcached_key $uri;
>    memcached_pass     127.0.0.1:11212;
>
>
> server {
>    listen 10.176.67.151:80;
>    server_name www.mysite.com;
>
>    location / {
>        proxy_pass http://10.176.67.151:8080/;
>        include /etc/nginx/proxy.conf;
>
>    set $memcached_key $uri;
>    memcached_pass     127.0.0.1:11212;
>
>
>    }
>    location /static/ {
>            alias /home/django/broadway.com/broadway/static/;
>            expires 1d;
>    }
>    location /media/ {
>            alias /home/django/broadway.com/src/django/django/contrib/ 
> admin/media/;
>            expires 1d;
>    }
> }
>
> Posted at Nginx Forum: http://forum.nginx.org/read.php?2,3617,3629#msg-3629
>
>






More information about the nginx mailing list