cluster

Infrastructure files for Nordgedanken and Midnightthoughts.
git clone git://archive.git.mtrnord.blog/MTRNord/cluster.git
Log | Files | Refs | README

server_config (953B)


      1 client_max_body_size ${MAX_UPLOAD_MiB}m;
      2 limit_req_zone $binary_remote_addr zone=loginlimit:10m rate=1r/s;
      3 
      4 # include the cache status in the log message
      5 log_format cache_log '$upstream_cache_status - '
      6     '$remote_addr [$time_local] '
      7     '"$request" $status $body_bytes_sent '
      8     '"$http_referer" "$http_user_agent" '
      9     '$upstream_response_time $request_time';
     10 
     11 # Create a cache for responses from the web app
     12 proxy_cache_path
     13     /var/cache/nginx/bookwyrm_cache
     14     keys_zone=bookwyrm_cache:20m
     15     loader_threshold=400
     16     loader_files=400
     17     max_size=400m;
     18 
     19 # use the accept header as part of the cache key
     20 # since activitypub endpoints have both HTML and JSON
     21 # on the same URI.
     22 proxy_cache_key $scheme$proxy_host$uri$is_args$args$http_accept;
     23 # only let one request to populate cache, see https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_lock
     24 proxy_cache_lock on;
     25 proxy_cache_lock_age 10s;
     26 proxy_cache_lock_timeout 10s;