nginx Digest, Vol 2, Issue 76

Danny Trinh dtrinh at
Mon Dec 28 06:22:44 MSK 2009

Hello Maxim,
I found another link and installed memcached. Now I see
is listening.
Sorry, my mistake due to "multitasking: watching football
cowboy-vie-redskin, and doing work" ;-)

Would you please give me your opinion about this setup? Just want to
find the correct setup for my system.
Would you give some hint so I can continue with nginx using  memcache?
If you think it's necessary, please send me to my email dtrinh at
eastonbellsports dot com.

Danny Trinh
Linux Admin

Message: 6
Date: Mon, 28 Dec 2009 02:33:23 +0300
From: Maxim Dounin <mdounin at>
To: nginx at
Subject: Re: port 11211 (memcached default) not open
Message-ID: <20091227233323.GW43547 at>
Content-Type: text/plain; charset=us-ascii


On Sun, Dec 27, 2009 at 04:38:59PM -0600, Danny Trinh wrote:

> Hello group,
> I use nginx-0.8.31 and do try the memcached config from
> html.
> location ~* \.(jpg|png|gif)$ {
> access_log   off;
> expires      max;
> add_header   Last-Modified "Thu, 26 Mar 2000 17:35:45 GMT";
> set $memcached_key $uri;
> memcached_pass;
> error_page         404 = /fetch;
> }
> But when I do "netstat -an", I didn't see port 11211 listening. Am I
> missing some thing?

Yes, you are.  nginx doesn't listen, it connects to memcached 
server which should listen on ip:port you specified.  It is up to 
you to start memcached and place appropriate data into it.

Also, you probably want to know that on modern operating 
systems it is usually bad idea to place files into memory 
explicitly.  Virtual memory subsystem will do it automatically as 
long as you have spare memory on your server, and will likely do 
it better than may be done by hand.

Other points in the post you linked are... uhm, questionable too 
(you may want to read "incorrect" here, but I'm not going to 
argue).  You probably want to disregard this post instead of 
following it.

Maxim Dounin

More information about the nginx mailing list