nginx as reverse caching proxy for CentOS repositories

Maxim Dounin mdounin at mdounin.ru
Sun Mar 14 23:51:54 MSK 2010


Hello!

On Sun, Mar 14, 2010 at 02:03:45PM +0100, Wouter Schoot wrote:

> In an attempt to create an offline copy for my homenetwork to
> quickly install CentOS I wanted to use nginx as a reverse caching
> proxy so that nginx stores all the files the that the CentOS
> installer requests after the first time.
> 
> However, after most of the startup files (product.img, stage2.img
> etc) are downloaded and cached succesfully, it bails on the
> chkconfig rpm (which happens to be the first file it actually
> downloads for the install, from the CentOS/ folder.

[...]

> This will be unable to troubleshoot without some debug. I've enabled
> caching debug and traced the (requesting) HTTP headers
> 
> T 192.168.1.113:33652 -> 192.168.1.104:80 [AP]
>   GET /centos/5.4/os/i386/CentOS/chkconfig-1.3.30.1-2.i386.rpm
> HTTP/1.1..Accept-Encoding: identity..Range:
> bytes=440-25087..Connection: close..Host: 192.168.1.104..User-agent:
>    urlgrabber/3.1.0 yum/3.2.22....

Most likely your client (incorrectly) assumes that range request 
must by satisfied, and bails out due to getting full reply (which 
happens when url in question isn't yet cached).

Looking into client code may shed some light on the problem.

[...]

Maxim Dounin



More information about the nginx mailing list