/nginx/conf/vhosts-available/lancache-blizzard.conf
https://gitlab.com/frag-o-matic/lan-cache · Config · 29 lines · 24 code · 5 blank · 0 comment · 0 complexity · a42bcc0243ee80d14a8f69f9fc44fe75 MD5 · raw file
- # blizzard
- log_format keys_blizzard "$server_name$request_uri $http_range";
- server {
- listen lancache-blizzard deferred default;
- server_name blizzard _;
- # DNS entries:
- # lancache-blizzard dist.blizzard.com.edgesuite.net llnw.blizzard.com dist.blizzard.com
- access_log /srv/lan-cache/logs/lancache-blizzard-access.log main buffer=128k flush=1m;
- access_log /srv/lan-cache/logs/lancache-blizzard-keys.log keys_blizzard buffer=128k flush=1m;
- error_log /srv/lan-cache/logs/lancache-blizzard-error.log;
-
- # Blizzard Node
- include lancache/resolver;
- location / {
- # Some downloads are very large so we cache based on range to keep
- # single downloads quick and hence ensure interactivity is good.
- proxy_set_header Range $http_range;
- proxy_set_header If-Range $http_if_range;
- proxy_cache_key "$server_name$request_uri $http_range";
- proxy_cache_valid 206 90d;
-
- # Use Blizzard cache
- proxy_cache blizzard;
- include lancache/proxy-cache;
- }
- }