/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

  1. # blizzard
  2. log_format keys_blizzard "$server_name$request_uri $http_range";
  3. server {
  4. listen lancache-blizzard deferred default;
  5. server_name blizzard _;
  6. # DNS entries:
  7. # lancache-blizzard dist.blizzard.com.edgesuite.net llnw.blizzard.com dist.blizzard.com
  8. access_log /srv/lan-cache/logs/lancache-blizzard-access.log main buffer=128k flush=1m;
  9. access_log /srv/lan-cache/logs/lancache-blizzard-keys.log keys_blizzard buffer=128k flush=1m;
  10. error_log /srv/lan-cache/logs/lancache-blizzard-error.log;
  11. # Blizzard Node
  12. include lancache/resolver;
  13. location / {
  14. # Some downloads are very large so we cache based on range to keep
  15. # single downloads quick and hence ensure interactivity is good.
  16. proxy_set_header Range $http_range;
  17. proxy_set_header If-Range $http_if_range;
  18. proxy_cache_key "$server_name$request_uri $http_range";
  19. proxy_cache_valid 206 90d;
  20. # Use Blizzard cache
  21. proxy_cache blizzard;
  22. include lancache/proxy-cache;
  23. }
  24. }