diff --git a/2.Common_services/5.Nginx/vhost_cache.conf b/2.Common_services/5.Nginx/vhost_cache.conf index 5fda715040d7b403428764b71da8025fad520f13..2dd592ead82a61fc8b1b002e8a2ee431d3d0d262 100644 --- a/2.Common_services/5.Nginx/vhost_cache.conf +++ b/2.Common_services/5.Nginx/vhost_cache.conf @@ -1,5 +1,10 @@ proxy_cache_path /tmp/nginx-uc-cache levels=1:2 keys_zone=uc-cache:10m max_size=10g inactive=300s; +log_format cache '$remote_addr - $host [$time_local] "$request" $status ' + '$body_bytes_sent "$http_referer" ' + 'rt=$request_time ut="$upstream_response_time" ' + 'cs=$upstream_cache_status'; + server { listen 80 default_server; listen 443 default_server ssl; @@ -7,7 +12,7 @@ server { root /var/www/cache/; - access_log /var/log/nginx/access_cache.log; + access_log /var/log/nginx/access_cache.log cache; error_log /var/log/nginx/error_cache.log; location /crossdomain {