AW: weird caching behaviour

Dipl.-Ing. Juergen Ladstaetter office at
Tue Feb 21 14:59:32 UTC 2012

That's it. Thanks very much

-----Ursprüngliche Nachricht-----
Von: nginx-bounces at [mailto:nginx-bounces at] Im Auftrag von
Maxim Dounin
Gesendet: Tuesday, February 21, 2012 9:38 AM
An: nginx at
Betreff: Re: weird caching behaviour


On Tue, Feb 21, 2012 at 09:27:51AM -0500, Dipl.-Ing. Juergen Ladstaetter

> Hi guys,
> we're running a load balanced cluster with nginx as load balancing 
> software and use the caching feature. So far we're caching for 3 high 
> frequent sites and it's working great.
> Now when I add another site to be cached (configuration is below) 
> nginx starts to cache EVERY website that it's loadbalancing. Can you 
> find an error in the configuration or tell me why it's doing this? Thanks
in advance.
> Nginx.conf:


> 	# include all vhosts
> 	include sites-enabled/*;
> }
> Default vhost without caching that catches all non-specific requests:
> 	# standard load balancer
> 	server {
> 		listen 		SYSserver:80;
> 		server_name	_;

This is *not* default vhost, as you don't have "default_server" 
option in listen directive, and order isn't guaranteed due to "include
sites-enabled/*" used.


    listen SYSserver:80 default_server;

should fix your problem.

More details may be found here:

Maxim Dounin

nginx mailing list
nginx at

More information about the nginx mailing list