Welcome! Log In Create A New Profile

Advanced

Re: nginx as a caching reverse proxy to replace squid/varnish

Mirosław Jaworski
August 18, 2009 03:53AM
On Mon, 2009-08-17 at 14:39 -0700, mobiledreamers@gmail.com wrote:
> Hey guys
> the following is our current setup on the apps
>
>
> but we would like to add nginx as a reverse proxy cache much like
> squid or varnish
> is it possible to edit this config to enable that caching behavior or
> do i need to add another nginx in front of this set up like i would do
> for squid or varnish
>
>
> if this can be done without resorting to usage of squid and varnish it
> would be nice to have the complete setup in nginx

http {
[...]

proxy_cache_path /opt/nginx/cache levels=1:2 keys_zone=one:10m;

[...]

server {
listen 127.0.0.1:8000;
server_name localhost;
access_log /var/log/nginx/one.access.log main;
location / {
proxy_pass http://192.168.10.10:80/;
proxy_redirect off;

proxy_cache one;
proxy_cache_valid 200 1h;
[...]
}
}

Declaring cache ( proxy_cache_path ) and caching ( proxy_cache ) should
be enough.

Proxy_cache_valid in above example is used to enforce caching for
objects that have no declaration on caching.

--
Miros
Subject Author Posted

nginx as a caching reverse proxy to replace squid/varnish

mobiledreamers@gmail.com August 17, 2009 05:39PM

Re: nginx as a caching reverse proxy to replace squid/varnish

Mirosław Jaworski August 18, 2009 03:53AM

nCache, Varnish Performance

princeap January 27, 2010 10:57PM

Re: nCache, Varnish Performance

merlin corey January 28, 2010 04:46PM

Re: nCache, Varnish Performance

Piotr Sikora January 28, 2010 05:04PM

RE: nCache, Varnish Performance

testbot January 28, 2010 05:14PM

Re: nCache, Varnish Performance

Jérôme Loyet January 28, 2010 05:20PM

RE: nCache, Varnish Performance

testbot January 28, 2010 05:26PM

Re: nCache, Varnish Performance

Kon Wilms January 28, 2010 05:30PM

Re: nCache, Varnish Performance

Maxim Dounin January 28, 2010 06:00PM

Re: nCache, Varnish Performance

Piotr Sikora January 28, 2010 06:14PM

Re: nCache, Varnish Performance

Ryan Malayter January 28, 2010 06:12PM

Re: nCache, Varnish Performance

Luca De Marinis January 29, 2010 04:52AM

Re: nCache, Varnish Performance

Akins, Brian February 01, 2010 08:04AM

Re: nginx as a caching reverse proxy to replace squid/varnish

Igor Sysoev August 19, 2009 08:38AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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