diff --git a/nginx/default.conf b/nginx/default.conf index 7acd24f..89ee2eb 100644 --- a/nginx/default.conf +++ b/nginx/default.conf @@ -1,5 +1,12 @@ vhost_traffic_status_zone; +log_format cache_log '$server_name $upstream_cache_status - ' + '$remote_addr [$time_local] ' + '"$request" $status $body_bytes_sent ' + '"$http_referer" "$http_user_agent" ' + '$upstream_response_time $request_time'; +access_log /var/log/nginx/access.log cache_log; + server { listen 80 default_server; diff --git a/nginx/etc/nginx.conf b/nginx/etc/nginx.conf index ad8ab09..22d27bd 100644 --- a/nginx/etc/nginx.conf +++ b/nginx/etc/nginx.conf @@ -66,6 +66,11 @@ http { loader_files=200 max_size=200m; + # use the accept header since some activitypub servers + # have both HTML and JSON on the same URI + proxy_cache_key $scheme$proxy_host$uri$is_args$args$http_accept; + + ## # Virtual Host Configs ##