server_config 740 B

12345678910111213141516171819202122
  1. client_max_body_size 10m;
  2. limit_req_zone $binary_remote_addr zone=loginlimit:10m rate=1r/s;
  3. # include the cache status in the log message
  4. log_format cache_log '$upstream_cache_status - '
  5. '$remote_addr [$time_local] '
  6. '"$request" $status $body_bytes_sent '
  7. '"$http_referer" "$http_user_agent" '
  8. '$upstream_response_time $request_time';
  9. # Create a cache for responses from the web app
  10. proxy_cache_path
  11. /var/cache/nginx/bookwyrm_cache
  12. keys_zone=bookwyrm_cache:20m
  13. loader_threshold=400
  14. loader_files=400
  15. max_size=400m;
  16. # use the accept header as part of the cache key
  17. # since activitypub endpoints have both HTML and JSON
  18. # on the same URI.
  19. proxy_cache_key $scheme$proxy_host$uri$is_args$args$http_accept;