Nginx as a Proxy for WSUS static caching not working

ranthor nginx-forum at nginx.us
Wed Dec 28 16:47:10 UTC 2011


Hello there,

I have a remote site containing lots of Windows Clients, which have no
access  to WSUS server but nginx.
What I want to achieve is  ; get the WSUS updates over the nginx proxy
saving  bandwith for me.


I checked this URL http://wiki.nginx.org/WSUSProxy and made the proxy
work. I am testing with a client and can see that nginx is proxy'ing the
file for the client. 

But it is not caching. Everytime  I start a new download for a specific
cab file, nginx downloads from the cab file from the WSUS server again.
(checking with netstat) The /cache/wsus  is empty, there is no error.
Eventhough there is no /cache directory nginx is not complaining about
that. How can I open full debug logging ( HIT MISS stuff)? I am not
familiar with the syntax.

How can I validate if the static caching is going to work?  I am testing
with 1 test client but I can not test it with all clients  ( over 800)

OS:Centos 5.7 i386
nginx version: nginx/1.0.11
conf file is the same as wikipedia ( I am not running any wpad file,
clients have proxy set on internet explorer)


There is the logs I get, nginx is putting the some files under the 
/var/tmp/nginx which is not set anywhere, 
also the file is not there after the check..


==> access.log <==
192.168.CLIENT.IP- - [28/Dec/2011:18:38:12 +0200] "HEAD
/selfupdate/wuident.cab?1112281638 HTTP/1.1" 200 0 "-"
"Windows-Update-Agent" "-"
192.168.CLIENT.IP- - [28/Dec/2011:18:38:12 +0200] "HEAD
/selfupdate/WSUS3/x86/Other/wsus3setup.cab?1112281638 HTTP/1.1" 200 0
"-" "Windows-Update-Agent" "-"
192.168.CLIENT.IP- - [28/Dec/2011:18:38:13 +0200] "GET
/selfupdate/WSUS3/x86/Other/wsus3setup.cab?1112281638 HTTP/1.1" 200
20742 "-" "Windows-Update-Agent" "-"

==> error.log <==
2011/12/28 18:38:14 [warn] 25164#0: *8 a client request body is buffered
to a temporary file /var/cache/nginx/client_temp/0000000001, client:
192.168.MY.IP, server: rusty.sbs.net.tr, request: "POST
/ClientWebService/client.asmx HTTP/1.1", host: "192.168.NGINX.IP:8081"

==> access.log <==
192.168.CLIENT.IP- - [28/Dec/2011:18:38:15 +0200] "POST
/ClientWebService/client.asmx HTTP/1.1" 200 869 "-"
"Windows-Update-Agent" "-"
192.168.CLIENT.IP- - [28/Dec/2011:18:38:15 +0200] "POST
/ClientWebService/client.asmx HTTP/1.1" 200 868 "-"
"Windows-Update-Agent" "-"

==> error.log <==
2011/12/28 18:38:15 [warn] 25164#0: *8 a client request body is buffered
to a temporary file /var/cache/nginx/client_temp/0000000002, client:
192.168.MY.IP, server: rusty.sbs.net.tr, request: "POST
/ClientWebService/client.asmx HTTP/1.1", host: "192.168.NGINX.IP:8081"

==> access.log <==
192.168.CLIENT.IP- - [28/Dec/2011:18:38:20 +0200] "POST
/ClientWebService/client.asmx HTTP/1.1" 200 1267 "-"
"Windows-Update-Agent" "-"
192.168.CLIENT.IP- - [28/Dec/2011:18:38:43 +0200] "HEAD
/selfupdate/wuident.cab?1112281638 HTTP/1.1" 200 0 "-"
"Windows-Update-Agent" "-"
192.168.CLIENT.IP- - [28/Dec/2011:18:38:43 +0200] "HEAD
/selfupdate/WSUS3/x86/Other/wsus3setup.cab?1112281638 HTTP/1.1" 200 0
"-" "Windows-Update-Agent" "-"
192.168.CLIENT.IP- - [28/Dec/2011:18:38:43 +0200] "GET
/selfupdate/WSUS3/x86/Other/wsus3setup.cab?1112281638 HTTP/1.1" 200
20742 "-" "Windows-Update-Agent" "-"
192.168.CLIENT.IP- - [28/Dec/2011:18:38:44 +0200] "POST
/ClientWebService/client.asmx HTTP/1.1" 200 869 "-"
"Windows-Update-Agent" "-"
192.168.CLIENT.IP- - [28/Dec/2011:18:38:44 +0200] "POST
/ClientWebService/client.asmx HTTP/1.1" 200 868 "-"
"Windows-Update-Agent" "-"

==> error.log <==
2011/12/28 18:38:44 [warn] 25164#0: *8 a client request body is buffered
to a temporary file /var/cache/nginx/client_temp/0000000003, client:
192.168.MY.IP, server: rusty.sbs.net.tr, request: "POST
/ClientWebService/client.asmx HTTP/1.1", host: "192.168.NGINX.IP:8081"
2011/12/28 18:38:44 [warn] 25164#0: *8 a client request body is buffered
to a temporary file /var/cache/nginx/client_temp/0000000004, client:
192.168.MY.IP, server: rusty.sbs.net.tr, request: "POST
/ClientWebService/client.asmx HTTP/1.1", host: "192.168.NGINX.IP:8081"

==> access.log <==
192.168.CLIENT.IP- - [28/Dec/2011:18:38:49 +0200] "POST
/ClientWebService/client.asmx HTTP/1.1" 200 1267 "-"
"Windows-Update-Agent" "-"



Should I use a different approach regarding the  wiki? ( there is not
proxy_cache stuff included on that page, I tried that but could not make
it due the lack of experience with syntax)

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,220614,220614#msg-220614



More information about the nginx mailing list