user nobody; worker_processes 1; error_log logs/error.log info; #pid logs/nginx.pid; events { worker_connections 1024; } http { include mime.types; default_type application/octet-stream; # Global proxy read timeout = 1 hour proxy_read_timeout 3600s; log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log logs/access.log main; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 1200; #gzip on; server { # Limit outgoing bandwidth pr. client listen 80; server_name DAZCACHE; #access_log logs/host.access.log main; # root url - don't cache here location / { allow 192.168.222.0/24; deny all; proxy_pass http://YOUR.WSUS.SERVER:80; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } # here is static caching location ~* ^/Content.+\.(cab|exe|psf|CAB|EXE|PSF)$ { root cache/wsus; error_page 404 = @fetch; } location @fetch { internal; proxy_pass http://YOUR.WSUS.SERVER:80; proxy_set_header Range ''; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_store on; root cache/wsus; } } }