Welcome! Log In Create A New Profile

Advanced

Can't get Nginx to work with memcached

May 27, 2009 10:43PM
Hi,

I think I'm having trouble even getting the most basic case of Nginx+memcached working properly. Here is my /etc/nginx/nginx.conf file:

[code]
user www-data;
worker_processes 1;

error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;

events {
worker_connections 1024;
}

http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

access_log /var/log/nginx/access.log;

sendfile on;
tcp_nopush on;

#keepalive_timeout 0;
tcp_nodelay on;

gzip on;

include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;

upstream backend {
server 127.0.0.1:81;
}

server{
listen 80;
location / {
set $memcached_key $uri;
memcached_pass 127.0.0.1:11211;
default_type text/html;
error_page 404 = /fetch;
}

location =/fetch {
proxy_pass http://backend;
break;
}
}
}
[/code]

I have nginx running on localhost:80 and an apache server on localhost:81. With this setup, when running memcached -vv, I should see output whenever any HTTP request is sent to the nginx server, because it should be searching for cached items, right? However I see absolutely no output from memcached -vv.....
Subject Author Posted

Can't get Nginx to work with memcached

sayeo87 May 27, 2009 10:43PM

Re: Can't get Nginx to work with memcached

sayeo87 May 28, 2009 02:00PM

Re: Can't get Nginx to work with memcached

Cliff Wells May 28, 2009 09:16PM

Re: Can't get Nginx to work with memcached

merlin corey May 29, 2009 12:12AM

Re: Can't get Nginx to work with memcached

sayeo87 May 28, 2009 08:46PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 257
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready