June 19, 2009 03:52PM
Hi folks,

So hopefully this will be very simple.

I got Nginx as a LB for the typical django setup. I am trying to put memcached on the LB nginx and all i keep getting are 502 erros.



http {
# main lb section to take the server out of rotation
# then just comment out the server.
#


upstream www2.mywebsitecom {
#server 10.176.67.151:80; ### web1
server 10.176.67.50:80; ### web2
#server 10.176.75.7:80; #### web3
}

upstream admin{
#server 10.176.67.151;
server 10.176.67.50;
#server 10.176.75.7:80;

}

server {
listen x.x.x.x:80;


location /admin { #the following module scans for /admin and rerouts to it
proxy_pass http://admin;
include /etc/nginx/proxy.conf;
}


location / {
proxy_pass http://mywebsite.com;
include /etc/nginx/proxy.conf;

#set $memcached_key $uri;
#memcached_pass 127.0.0.1:11211;


}





}

include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
sendfile on;
#tcp_nopush on;
keepalive_timeout 999;
tcp_nodelay on;



#####################################
## Compression
gzip on;
gzip_buffers 16 8k;
gzip_comp_level 6;
gzip_http_version 1.0;
gzip_min_length 0;
gzip_types text/plain text/html text/css image/png image/gif image/jpg image/jpeg text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
gzip_vary on;

#include /etc/nginx/conf.d/*.conf;
#include /etc/nginx/sites-enabled/*;
}
Subject Author Posted

memcached on the LB - please help this NEWB

vburshteyn June 19, 2009 03:52PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 88
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